sparse.regression {inferCSN} | R Documentation |
Sparse regression model
Description
Sparse regression model
Usage
sparse.regression(
x,
y,
cross_validation = FALSE,
seed = 1,
penalty = "L0",
algorithm = "CD",
regulators_num = ncol(x),
n_folds = 10,
percent_samples = 1,
r_threshold = 0,
computation_method = "cor",
verbose = FALSE,
...
)
Arguments
x |
The data matrix |
y |
The response vector |
cross_validation |
Check whether cross validation is used. |
seed |
The seed used in randomly shuffling the data for cross-validation. |
penalty |
The type of regularization.
This can take either one of the following choices: |
algorithm |
The type of algorithm used to minimize the objective function.
Currently |
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. Recommend setting this to a small fraction of min(n,p) (e.g. 0.05 * min(n,p)) as L0 regularization typically selects a small portion of non-zeros. |
n_folds |
The number of folds for cross-validation. |
percent_samples |
The percent of all samples used for |
r_threshold |
Threshold of |
computation_method |
The method used to compute |
verbose |
Print detailed information. |
... |
Parameters for other methods. |
Value
Coefficients
Examples
data("example_matrix")
sparse.regression(
example_matrix[, -1],
example_matrix[, 1]
)