fit_srm {inferCSN} | R Documentation |
Sparse regression model
Description
Sparse regression model
Usage
fit_srm(
x,
y,
cross_validation = FALSE,
seed = 1,
penalty = "L0",
regulators_num = ncol(x),
n_folds = 5,
verbose = TRUE,
...
)
Arguments
x |
The matrix of regulators. |
y |
The vector of target. |
cross_validation |
Logical value, default is |
seed |
The random seed for cross-validation, default is |
penalty |
The type of regularization, default is |
regulators_num |
The number of non-zore coefficients, this value will affect the final performance. The maximum support size at which to terminate the regularization path. |
n_folds |
The number of folds for cross-validation, default is |
verbose |
Logical value, default is |
... |
Parameters for other methods. |
Value
A list of the sparse regression model. The list has the following components:
model |
The sparse regression model. |
metrics |
A list of metrics. |
coefficients |
A list of coefficients. |
Examples
data("example_matrix")
fit_srm(
x = example_matrix[, -1],
y = example_matrix[, 1]
)