Orthogonal LDA (OLDA) is an extension of classical LDA where the discriminant vectors are orthogonal to each other.

basis_olda(data, class, d = 2)

Arguments

data

Numeric matrix or data.frame of the observations, coerced to matrix.

class

The class for each observation, coerced to a factor.

d

Number of dimensions in the projection space.

Value

A numeric matrix, an orthogonal basis that best distinguishes the group means of class.

References

Ye J (2005). "Characterization of a Family of Algorithms for Generalized Discriminant Analysis on Undersampled Problems." J. Mach. Learn. Res., 6, 483-502. ISSN 1532-4435.

See also

Rdimtools::do.olda

Other basis producing functions: basis_guided(), basis_half_circle(), basis_odp(), basis_onpp(), basis_pca()

Examples

dat_std <- scale_sd(wine[, 2:6])
clas    <- wine$Type
basis_olda(data = dat_std, class = clas)
#>                   oLD1       oLD2
#> Alcohol    -0.71181390  0.4172024
#> Malic      -0.05316458 -0.1322261
#> Ash        -0.46961177 -0.4164469
#> Alcalinity  0.51370624  0.2958831
#> Magnesium  -0.07787931  0.7399214