Orthogonal Discriminant Projection (ODP) is a linear dimension reduction method with class supervision. It maximizes weighted difference between local and non-local scatter while local information is also preserved by constructing a neighborhood graph.

basis_odp(data, class, d = 2, type = c("proportion", 0.1), ...)

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. of class.

type

A vector specifying the neighborhood graph construction. Expects; c("knn", k), c("enn", radius), or c("proportion",ratio). Defaults to c("knn", sqrt(nrow(data))), nearest neighbors equal to the square root of observations.

...

Optional, other arguments to pass to Rdimtools::do.odp.

References

Li B, Wang C, Huang D (2009). "Supervised feature extraction based on orthogonal discriminant projection." Neurocomputing, 73(1-3), 191-196.

See also

Rdimtools::do.odp for locality preservation arguments.

Rdimtools::aux.graphnbd for details on type.

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

Examples

dat_std <- scale_sd(wine[, 2:6])
clas <- wine$Type
basis_odp(data = dat_std, class = clas)
#>                   ODP1       ODP2
#> Alcohol    -0.09757908  0.6574736
#> Malic      -0.43063919 -0.1367893
#> Ash        -0.65060486  0.1822601
#> Alcalinity -0.57577229 -0.4369300
#> Magnesium  -0.22411559  0.5699918