Description Usage Arguments Value
View source: R/stackingFunctions.R
Cleans the training data for glmnet, which requires a model matrix instead of a formula
1 2 | cleanDataLASSO(trainset, lasso_vars, lasso_factors = NULL,
testset = NULL, new_vars_lasso = NULL)
|
trainset |
The training dataset |
lasso_vars |
Predictor variables to use in the LASSO model |
lasso_factors |
Which predictor variables need to be converted to factors |
testset |
Optional test set; included so that both cleaned versions will have the same dimensions |
new_vars_lasso |
Optional variable names to include as input |
A list, containing cleaned versions of the trainset and testset
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.