do.odp {Rdimtools} | R Documentation |
Orthogonal Discriminant Projection
Description
Orthogonal Discriminant Projection (ODP) is a linear dimension reduction method with label information, i.e., supervised. The method maximizes weighted difference between local and non-local scatter while local information is also preserved by constructing a neighborhood graph.
Usage
do.odp(
X,
label,
ndim = 2,
preprocess = c("center", "scale", "cscale", "decorrelate", "whiten"),
type = c("proportion", 0.1),
symmetric = c("union", "intersect", "asymmetric"),
alpha = 0.5,
beta = 10
)
Arguments
X |
an |
label |
a length- |
ndim |
an integer-valued target dimension. |
preprocess |
an additional option for preprocessing the data.
Default is "center". See also |
type |
a vector of neighborhood graph construction. Following types are supported;
|
symmetric |
one of |
alpha |
balancing parameter of non-local and local scatter in |
beta |
scaling control parameter for distant pairs of data in |
Value
a named list containing
- Y
an
(n\times ndim)
matrix whose rows are embedded observations.- projection
a
(p\times ndim)
whose columns are basis for projection.- trfinfo
a list containing information for out-of-sample prediction.
References
Li B, Wang C, Huang D (2009). “Supervised Feature Extraction Based on Orthogonal Discriminant Projection.” Neurocomputing, 73(1-3), 191–196.
Examples
## use iris data
data(iris)
set.seed(100)
subid = sample(1:150, 50)
X = as.matrix(iris[subid,1:4])
label = as.factor(iris[subid,5])
## try different beta (scaling control) parameter
out1 = do.odp(X, label, beta=1)
out2 = do.odp(X, label, beta=10)
out3 = do.odp(X, label, beta=100)
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, col=label, pch=19, main="ODP::beta=1")
plot(out2$Y, col=label, pch=19, main="ODP::beta=10")
plot(out3$Y, col=label, pch=19, main="ODP::beta=100")
par(opar)