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