ldaGSVD(formula, data)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 the ldaGSVD()
terms: a object of class terms derived using the input formula and the training data
prior: a table 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 input formula and the training data
an object of class formula, which has the form class ~ x1 + x2 + ...
a data frame that contains both predictors and the response. Missing values are NOT allowed.
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.
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
fit <- ldaGSVD(Species~., data = iris)
# prediction
predict(fit,iris)
Run the code above in your browser using DataLab