predict.msda {TULIP} | R Documentation |
Predict categorical responses for vector data.
Description
Predict categorical responses on new vector data given the fitted DSDA/MSDA model input.
Usage
## S3 method for class 'msda'
predict(object, newx, z = NULL, ztest = NULL, gamma = NULL,...)
Arguments
object |
Fitted model object from |
newx |
The matrix of new values for |
z |
Input training covariates matrix. |
ztest |
Input testing covariates matrix. |
gamma |
Coefficients of covariates obtained from |
... |
Other arguments that can be passed to |
Details
The function fits LDA model on selected discriminant vectors. Call predict
or predict.msda
to perform prediction. When covariates exist, users could first call adjvec
to make adjustment and obtain obtain gamma
. The fitted model from msda
should also takes adjusted vector as input. The newx
in predict.msda
shoudl be adjusted vector as well.
Value
Predicted class label(s) at the entire sequence of the penalty parameter lambda
used to create the model.
Author(s)
Yuqing Pan, Qing Mai, Xin Zhang
References
Mai, Q., Zou, H. and Yuan, M. (2012), "A direct approach to sparse discriminant analysis in ultra-high dimensions." Biometrica, 99, 29-42.
Mai, Q., Yang, Y., and Zou, H. (2017), "Multiclass sparse discriminant analysis." Statistica Sinica, in press.
Pan, Y., Mai, Q., and Zhang, X. (2018), "Covariate-Adjusted Tensor Classification in High-Dimensions." Journal of the American Statistical Association, accepted.
See Also
Examples
data(GDS1615)
x<-GDS1615$x
y<-GDS1615$y
obj <- msda(x = x, y = y)
pred<-predict(obj,x)