View source: R/predict.glmnetcr.R
predict.glmnetcr | R Documentation |
Returns the AIC, BIC, predicted class, and the fitted probabilities for the K classes for all steps along the path.
## S3 method for class 'glmnetcr'
predict(object, newx = NULL, ...)
object |
a |
newx |
a data matrix representing the predictor variables, if missing defaults to original data used in fitting the model |
... |
additional optional arguments |
AIC |
a numeric vector representing the AIC for each step |
BIC |
a numeric vector representing the BIC for each step |
class |
a matrix with n rows indicating the predicted class for each observation in newx for each stepp |
probs |
an array where for each step, a matrix of n rows and K columns indicates the fitted class probabilities for each observation and class |
Kellie J. Archer, archer.43@osu.edu
See Also as glmnetcr
, fitted.glmnetcr
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
glmnet.fit <- glmnetcr(x, y)
result <- predict(glmnet.fit)
names(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.