predict.msda: make predictions from a "msda" object.

View source: R/predict.msda.R

predict.msdaR Documentation

make predictions from a "msda" object.

Description

This functions predicts class labels from a fitted msda object.

Usage

## S3 method for class 'msda'
predict(object, newx, ...)

Arguments

object

fitted msda model object.

newx

matrix of new values for x at which predictions are to be made. NOTE: newx must be a matrix, predict function does not accept a vector or other formats of newx.

...

Not used. Other arguments to predict.

Value

predicted class label(s) at the entire sequence of the penalty parameter lambda used to create the model.

Author(s)

Qing Mai <mai@stat.fsu.edu>, Yi Yang <yi.yang6@mcgill.ca>, Hui Zou <hzou@stat.umn.edu>
Maintainer: Yi Yang <yi.yang6@mcgill.ca>

References

Mai, Q.*, Yang, Y.*, and Zou, H. (2014), "Multiclass Sparse Discriminant Analysis." Submitted to Journal of the American Statistical Association. (* co-first author)

URL: https://github.com/emeryyi/msda

See Also

msda

Examples

data(GDS1615)
x<-GDS1615$x
y<-GDS1615$y
obj <- msda(x = x, y = y)
pred<-predict(obj,x)

msda documentation built on Sept. 12, 2022, 9:05 a.m.

Related to predict.msda in msda...