Description Usage Arguments Value See Also
Adjust a multivariate regression with structuring, sparse penalty.
1 2 3 4 5 6 7 | spring(x, y, lambda1 = NULL, lambda2 = c(1, 0.1, 0.01, 0.001),
struct = sparseMatrix(i = 1:p, j = 1:p, x = rep(1, p)), cov = NULL,
intercept = TRUE, normalize = FALSE, threshold = 0.001,
max.iter = 100, verbose = ifelse(length(lambda2) > 1, 1, 2),
min.ratio = 0.01, nlambda1 = ifelse(is.null(lambda1), ifelse(is.null(cov),
10, 50), length(lambda1)), comp.df = TRUE, mc.cores = min(length(lambda2),
detectCores()))
|
x |
matrix of features. Do NOT include intercept. |
y |
matrix of responses. |
lambda1 |
sequence of decreasing l1-penalty
levels. If |
lambda2 |
real scalar; tunes the l2 structuring penalty in the Elastic-net. Default is 0.05. |
struct |
matrix structuring the coefficients, possibly
sparsely encoded. If |
cov |
the matrix of variance-covariance between the
reponses y. If |
intercept |
logical; indicates if a vector of intercepts
should be included in the model. Default is |
normalize |
logical; indicates if predictor variables should
be normalized to have unit L2 norm before fitting. Default is
|
threshold |
a threshold for convergence for each
|
max.iter |
integer; the maximal number of iteration (i.e. number of alternated optimization between each parameter) used to solve the problem for a given value of lambda1. Default is 100 |
verbose |
integer; activate verbose mode from '0' (nothing) to '2' (detailed output). |
min.ratio |
minimal value of l1-part of the
penalty that will be tried, as a fraction of the maximal
|
nlambda1 |
integer that indicates the number of values to put
in the |
comp.df |
<...> |
mc.cores |
if |
an object with class spring
, see the
documentation page spring
for details.
See also spring
and cv.spring
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.