dtrda: Discriminant analysis with Trace Regularization (DTR)

View source: R/dtr.R

dtrdaR Documentation

Discriminant analysis with Trace Regularization (DTR)

Description

Finds a low-dimensional discriminant subspace that maximizes the between-class scatter while controlling the within-class scatter.

Usage

dtrda(X, Y, preproc = multivarious::center(), d = 2, alpha)

Arguments

X

numeric matrix of predictors, of dimension n x p.

Y

factor variable of class labels, of length n.

preproc

A preprocessing function to apply to the data. Default is centering.

d

integer, the dimension of the discriminant subspace. Must be <= K-1 where K is the number of classes.

alpha

numeric, tuning parameter in 0,1 that controls the trade-off between between-class and within-class scatters.

Value

An S3 object of class "discriminant_projector" containing the transformation matrix W, the transformed scores, and related metadata.

References

Ahn, J., Chung, H. C., & Jeon, Y. (2021). Trace Ratio Optimization for High-Dimensional Multi-Class Discrimination. Journal of Computational and Graphical Statistics, 30(1), 192-203. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2020.1807352")}

Examples

X = matrix(rnorm(100*1000), 100, 1000) 
y = sample(1:3, 100, replace=TRUE)
V = dtrda(X, y, d=2, alpha=0.5, lambda=0.1)
Xp = X %*% V  # project data onto discriminant subspace


bbuchsbaum/discursive documentation built on April 14, 2025, 4:57 p.m.