Control function to handle parameters for fitting a multi-type regularized generalized linear model (GLM) using the SMuRF algorithm. The function sets defaults and performs input checks on the provided parameters.
glmsmurf.control(
epsilon = 1e-08,
maxiter = 10000,
step = NULL,
tau = 0.5,
reest = TRUE,
lambda.vector = NULL,
lambda.min = NULL,
lambda.max = NULL,
lambda.length = 50L,
lambda.reest = FALSE,
k = 5L,
oos.prop = 0.2,
validation.index = NULL,
ncores = NULL,
po.ncores = NULL,
print = FALSE
)
Numeric tolerance value for stopping criterion. A numeric strictly larger than 0, default is 1e-8
.
Maximum number of iterations of the SMuRF algorithm. A numeric larger than or equal to 1, default is 10 000
.
Initial step size, a numeric strictly larger than 0 or NULL
. When NULL
(default), it is equal to 0.1
times the sample size.
Parameter for backtracking the step size. A numeric strictly between 0 and 1, default is 0.5.
Values of lambda to consider when selecting the optimal value of lambda. A vector of strictly positive numerics (which is preferably a decreasing sequence as we make use of warm starts) or NULL
(default).
When NULL
, it is set to an exponential decreasing sequence of length lambda.length
between lambda.max
and lambda.min
.
Minimum value of lambda to consider when selecting the optimal value of lambda. A strictly positive numeric or NULL
(default).
When NULL
, it is equal to 0.0001
times lambda.max
. This argument is ignored when lambda.vector
is not NULL
.
Maximum value of lambda to consider when selecting the optimal value of lambda. A strictly positive numeric larger than lambda.min
or NULL
(default).
In the latter case, lambda.max
will be determined based on the used penalty types such that it is one of the smallest values of lambda that results in an intercept-only model. This argument is ignored when lambda.vector
is not NULL
.
Number of lambda values to consider when selecting the optimal value of lambda. A strictly positive integer, default is 50. This argument is ignored when lambda.vector
is not NULL
.
Logical indicating if the re-estimated coefficients are used when selecting lambda, default is FALSE
.
This argument is only used if reest
is TRUE
.
Number of folds when selecting lambda using cross-validation. A strictly positive integer, default is 5 (i.e. five-fold cross-validation). This number cannot be larger than the number of observations. Note that cross-validation with one fold (k=1
) is the same as in-sample selection of lambda
.
Proportion of the data that is used as the validation sample when selecting lambda
out-of-sample. A numeric strictly between 0 and 1, default is 0.2.
This argument is ignored when validation.index
is not NULL
.
Vector containing the row indices of the data matrix corresponding to the observations that are used as the validation sample.
This argument is only used when lambda
is selected out-of-sample. Default is NULL
meaning that randomly 100*oos.prop
% of the data are used as validation sample.
Number of cores used when performing cross-validation. A strictly positive integer or NULL
(default).
When NULL
, max(nc-1,1)
cores are used where nc
is the number of cores as determined by detectCores
.
Number of cores used when computing the proximal operators. A strictly positive integer or NULL
(default).
When NULL
or ncores > 1
, po.ncores
is set to 1.
A logical indicating if intermediate results need to be printed, default is FALSE
.
A list with elements named as the arguments.
More details on the selection of lambda can be found in the package vignette.
Fitting procedures: glmsmurf
and glmsmurf.fit
(given design matrix). glm.control
# NOT RUN {
## See example(plot_lambda) for examples
# }
Run the code above in your browser using DataLab