ldaGSVD {LDATree} | R Documentation |
Linear Discriminant Analysis using the Generalized Singular Value Decomposition
Description
Usage
ldaGSVD(formula, data)
Arguments
formula |
an object of class formula, which has the form |
data |
a data frame that contains both predictors and the response. Missing values are NOT allowed. |
Details
Traditional Fisher's Linear Discriminant Analysis (LDA) ceases to work when
the within-class scatter matrix is singular. The Generalized Singular Value
Decomposition (GSVD) is used to address this issue. GSVD simultaneously
diagonalizes both the within-class and between-class scatter matrices without
the need to invert a singular matrix. This method is believed to be more
accurate than PCA-LDA (as in MASS::lda
) because it also considers the
information in the between-class scatter matrix.
Value
An object of class ldaGSVD
containing the following components:
-
scaling
: a matrix which transforms the training data to LD scores, normalized so that the within-group scatter matrix is proportional to the identity matrix. -
formula
: the formula passed to theldaGSVD()
-
terms
: a object of classterms
derived using the inputformula
and the training data -
prior
: atable
of the estimated prior probabilities. -
groupMeans
: a matrix that records the group means of the training data on the transformed LD scores. -
xlevels
: a list records the levels of the factor predictors, derived using the inputformula
and the training data
References
Ye, J., Janardan, R., Park, C. H., & Park, H. (2004). An optimization criterion for generalized discriminant analysis on undersampled problems. IEEE Transactions on Pattern Analysis and Machine Intelligence
Howland, P., Jeon, M., & Park, H. (2003). Structure preserving dimension reduction for clustered text data based on the generalized singular value decomposition. SIAM Journal on Matrix Analysis and Applications
Examples
fit <- ldaGSVD(Species~., data = iris)
# prediction
predict(fit,iris)