binom_blasso | R Documentation |
This function performs n glmnet::cv.glmnet(family = "binomial")
models using bootstrap validation and splitting the input data in train and test at each loop.
binom_blasso( x, y, loops = 2, bootstrap = TRUE, smote = FALSE, perc_over = 2, perc_under = 2, alpha = 1, nfolds = 10, seed = 987654321, ncores = 2 )
x |
x matrix as in glmnet. |
y |
Should be either a numeric factor with two levels. |
loops |
Number of loops (a |
bootstrap |
Logical indicating if bootstrap will be performed or not. |
smote |
Logical. If it's set to TRUE, the Synthetic Minority Over-sampling Technique will be used to reduce random oversampling. See |
perc_over |
If smote parameter is TRUE. A number that drives the decision of how many extra cases from the minority class are generated (known as over-sampling). |
perc_under |
If smote parameter is TRUE. A number that drives the decision of how many extra cases from the majority classes are selected for each case generated from the minority class (known as under-sampling). |
alpha |
The elasticnet mixing parameter, with 0 ≤ alpha ≤ 1. alpha = 1 is the lasso penalty, and alpha = 0 the ridge penalty. |
nfolds |
number of folds - default is 10. Although nfolds can be as large as the sample size (leave-one-out CV), it is not recommended for large datasets. Smallest value allowable is nfolds=3. |
seed |
|
ncores |
Number of cores. Each loop will run in one core using the |
A LassoLoop object with the results.
Pol Castellano-Escuder
Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22. URL http://www.jstatsoft.org/v33/i01/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.