grouplasso_linreg_cv_adapt | R Documentation |
Choose tuning parameters by crossvalidation for grouplasso linreg with adaptive weights
grouplasso_linreg_cv_adapt( Y, X, groups, n.lambda, lambda.min.ratio, lambda.max.ratio = 1, n.folds, w, tol = 0.001, maxiter = 500, report.prog = TRUE )
Y |
the response vector |
X |
matrix containing the design matrices |
groups |
a vector indicating to which group each covariate belongs |
n.lambda |
the number of lambda values desired |
lambda.min.ratio |
ratio of the smallest lambda value to the smallest value of lambda which admits no variables to the model |
lambda.max.ratio |
ratio of the largest lambda value to the smallest value of lambda which admits no variables to the model |
n.folds |
the number of crossvalidation folds |
w |
group-specific weights for different penalization toward similarity for different groups |
tol |
a convergence criterion |
maxiter |
the maximum allowed number of iterations |
report.prog |
a logical indicating whether the progress of the algorithm should be printed to the console |
a list containing the fits over a grid of lambda values as well as the vector of lambda values
grouplasso_linreg_data <- get_grouplasso_data(n = 400, response = "continuous") grouplasso_linreg_cv_adapt.out <- grouplasso_linreg_cv_adapt(Y = grouplasso_linreg_data$Y, X = grouplasso_linreg_data$X, groups = grouplasso_linreg_data$groups, n.lambda = 25, lambda.min.ratio = 0.001, lambda.max.ratio = 0.1, n.folds = 5, w = grouplasso_linreg_data$w, tol = 1e-3, maxiter = 500, report.prog = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.