Description Usage Arguments Details Value See Also Examples
Computes a split regularized regression estimator. The sparsity and diversity penalty parameters are chosen automatically.
1 2 3 4 5 6 7 8 9 10 11 12 | cv.SplitReg(
x,
y,
num_lambdas_sparsity = 100,
num_lambdas_diversity = 100,
alpha = 1,
num_models = 10,
tolerance = 1e-08,
max_iter = 1e+05,
num_folds = 10,
num_threads = 1
)
|
x |
Design matrix. |
y |
Response vector. |
num_lambdas_sparsity |
Length of the grid of sparsity penalties. |
num_lambdas_diversity |
Length of the grid of diversity penalties. |
alpha |
Elastic Net tuning constant: the value must be between 0 and 1. Default is 1 (Lasso). |
num_models |
Number of models to build. |
tolerance |
Tolerance parameter to stop the iterations while cycling over the models. |
max_iter |
Maximum number of iterations before stopping the iterations while cycling over the models. |
num_folds |
Number of folds for cross-validating. |
num_threads |
Number of threads used for parallel computation over the folds. |
Computes a split regularized regression estimator with num_models
(G) models, defined as the linear models
\boldsymbol{β}^{1},…, \boldsymbol{β}^{G} that minimize
∑\limits_{g=1}^{G}≤ft( \frac{1}{2n}\Vert \mathbf{y}-\mathbf{X} \boldsymbol{β}^{g}\Vert^{2} +λ_{S}≤ft( \frac{(1-α)}{2}\Vert \boldsymbol{β}^{g}\Vert_{2}^{2}+α \Vert \boldsymbol{ β \Vert_1}\right)+\frac{λ_{D}}{2}∑\limits_{h\neq g}∑_{j=1}^{p}\vert β_{j}^{h}β_{j}^{g}\vert \right),
over grids for the penalty parameters λ_{S} and λ_{D} that are built automatically.
Larger values of λ_{S} encourage more sparsity within the models and larger values of λ_{D} encourage more diversity
among them.
If λ_{D}=0, then all of the models are equal to the Elastic Net regularized
least squares estimator with penalty parameter λ_{S}. Optimal penalty parameters are found by
num_folds
cross-validation, where the prediction of the ensemble is formed by simple averaging.
The predictors and the response are standardized to zero mean and unit variance before any computations are performed.
The final output is in the original scales.
An object of class cv.SplitReg, a list with entries
betas |
Coefficients computed over the path of penalties for sparsity; the penalty for diversity is fixed at the optimal value. |
intercepts |
Intercepts for each of the models along the path of penalties for sparsity. |
index_opt |
Index of the optimal penalty parameter for sparsity. |
lambda_sparsity_opt |
Optimal penalty parameter for sparsity. |
lambda_diversity_opt |
Optimal penalty parameter for diversity. |
lambdas_sparsity |
Grid of sparsity parameters. |
lambdas_diversity |
Grid of diversity parameters. |
cv_mse_opt |
Optimal CV MSE. |
call |
The matched call. |
predict.cv.SplitReg
, coef.cv.SplitReg
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.