View source: R/L_zero_regression.R
k_var_model | R Documentation |
Best subset selection for linear regression
k_var_model(
X_train,
y_train,
X_test = NULL,
y_test = NULL,
k = 1,
parallel = FALSE
)
X_train |
The design matrix used during training. |
y_train |
The response variable used during training. |
X_test |
The design matrix used during testing. Default is |
y_test |
The response variable used during testing. Default is |
k |
The maximum number of predictors allowed in the model. For example, |
parallel |
Logical flag for parallelization. Default is |
A list of outputs.
models |
An |
names |
The variable name of the best k predictors. |
rmse_in |
In-sample RMSE of the model. |
rmse_out |
Out-of-sample RMSE of the model. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.