k_var_model {iBART} | R Documentation |
Best subset selection for linear regression
Description
Best subset selection for linear regression
Usage
k_var_model(
X_train,
y_train,
X_test = NULL,
y_test = NULL,
k = 1,
parallel = FALSE
)
Arguments
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 |
Value
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. |