AIC, BIC, Predicted Class, and Fitted Probabilities for All Models

Share:

Description

Returns the AIC, BIC, predicted class, and the fitted probabilities for the K classes for all steps along the path.

Usage

1
2
## S3 method for class 'glmnet.cr'
predict(object, newx = NULL, ...)

Arguments

object

a glmnet.cr object

newx

a data matrix representing the predictor variables, if missing defaults to original data used in fitting the model

...

additional optional arguments

Value

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

Author(s)

Kellie J. Archer, kjarcher@vcu.edu

See Also

See Also as glmnet.cr, fitted.glmnet.cr

Examples

1
2
3
4
5
6
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
glmnet.fit <- glmnet.cr(x, y)
result <- predict(glmnet.fit)
names(result)