Construct a grid of values for the regularization parameter in
rdmc() or soft_impute().
fraction_grid(
min = 0.01,
max = 1,
nb_lambda = 10L,
log = TRUE,
reverse = FALSE
)mult_grid(min = 0.05, factor = 1.5, nb_lambda = 10L)
A numeric vector of values for the regularization parameter.
numeric; the smallest value of the regularization parameter.
For fraction_grid(), it must be in the interval (0, 1) with the
default being 0.01. For mult_grid(), it must be larger than 0 with
the default being 0.05.
numeric; the largest value of the regularization parameter. It
must be in the interval (min, 1] with the default being 1.
a positive integer giving the number of values for the regularization parameter to be generated.
a logical indicating whether the grid of values should be on a
logarithmic scale (defaults to TRUE).
a logical indicating whether the grid of values should be
in ascending order (FALSE, the default) or in descending order
(TRUE).
numeric; multiplication factor larger than 1 to be used to
construct the values of the regularization parameter. That is, the second
value is obtained by multiplying min by factor, with this
process being iterated further.
Function fraction_grid() generates a grid of values in the interval
(0, 1], either on a logarithmic or linear scale, which rdmc()
and soft_impute() can relate to a certain reference value
computed from the data at hand.
Function mult_grid() generates a multiplicative grid in which the
each value is obtained by multiplying the previous value with a specified
factor.
rdmc(), rdmc_tune(),
soft_impute(), soft_impute_tune()
fraction_grid()
fraction_grid(log = FALSE)
mult_grid(factor = 2)
Run the code above in your browser using DataLab