Outputs predicted response values for new user input observations at a specified
A fitted object of class
A matrix of new covariates
The indexes of lambda values to be used for prediction
The standardization method for
newX should have the same number of columns as the covariate matrix used to obtain
obj. The argument
standardize specifies how
newX should be standardized. For the choice
"train", the means and variances attached to
obj are used. For the choice
"self", the own means and variances of
newX are used.
A vector or matrix of predicted responses. Each column corresponds to a value of lambda.
Kourosh Zarringhalam and David Degras
Modified from SGL package: Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani
Maintainer: Kourosh Zarringhalam <[email protected]>
Simon, N., Friedman, J., Hastie T., and Tibshirani, R. (2011)
A Sparse-Group Lasso,
1 2 3 4 5 6 7 8 9 10 11 12 13
n = 50; p = 100; size.groups = 10 index <- ceiling(1:p / size.groups) X = matrix(rnorm(n * p), ncol = p, nrow = n) beta = (-2:2) y = X[,1:5] %*% beta + 0.1*rnorm(n) y = ifelse((exp(y) / (1 + exp(y))) > 0.5, 1, 0) data = list(x = X, y = y) weights = rep(1, size.groups) Fit = creSGL(data, index, weights, type = "logit", maxit = 1000, thresh = 0.001, min.frac = 0.05, nlam = 100, gamma = 0.8, standardize = TRUE, verbose = FALSE, step = 1, reset = 10, alphas = 0.05, lambdas = NULL) X.new = matrix(rnorm(n * p), ncol = p, nrow = n) predict(Fit, X.new, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.