nestedcv0.7.10 package

Nested Cross-Validation with 'glmnet' and 'caret'

plot_lambdas

Plot cross-validated glmnet lambdas across outer folds

plot_shap_bar

SHAP importance bar plot

cv_varImp

Extract variable importance from outer CV caret models

cv_coef

Coefficients from outer CV glmnet models

lm_filter

Linear model filter

plot_caret

Plot caret tuning

repeatfolds

Create folds for repeated nested CV

barplot_var_stability

Barplot variable stability

boot_filter

Bootstrap for filter functions

boot_ttest

Bootstrap univariate filters

boruta_filter

Boruta filter

boxplot_expression

Boxplot expression levels of model predictors

class_balance

Check class balance in training folds

coef.cva.glmnet

Extract coefficients from a cva.glmnet object

coef.nestcv.glmnet

Extract coefficients from nestcv.glmnet object

collinear

Filter to reduce collinearity in predictors

combo_filter

Combo filter

correls2

Correlation between a vector and a matrix

cva.glmnet

Cross-validation of alpha for glmnet

glmnet_coefs

glmnet coefficients

glmnet_filter

glmnet filter

innercv_preds

Inner CV predictions

innercv_roc

Build ROC curve from left-out folds from inner CV

innercv_summary

Summarise performance on inner CV test folds

lines.prc

Add precision-recall curve to a plot

mcc

Matthews correlation coefficient

metrics

Model performance metrics

model.hsstan

hsstan model for cross-validation

nestcv.glmnet

Nested cross-validation with glmnet

nestcv.SuperLearner

Outer cross-validation of SuperLearner model

nestcv.train

Nested cross-validation for caret

one_hot

One-hot encode

outercv

Outer cross-validation of selected models

plot_alphas

Plot cross-validated glmnet alpha

plot_shap_beeswarm

SHAP importance beeswarm plot

plot_var_stability

Plot variable stability

plot_varImp

Variable importance plot

plot.cva.glmnet

Plot lambda across range of alphas

plot.prc

Plot precision-recall curve

rf_filter

Random forest filter

pls_filter

Partial Least Squares filter

prc

Build precision-recall curve

pred_nestcv_glmnet

Prediction wrappers to use fastshap with nestedcv

predict.cva.glmnet

Predict method for cva.glmnet models

predict.hsstan

Predict from hsstan model fitted within cross-validation

predict.nestcv.glmnet

Predict method for nestcv.glmnet fits

predSummary

Summarise prediction performance metrics

randomsample

Oversampling and undersampling

ranger_filter

Random forest ranger filter

relieff_filter

ReliefF filter

repeatcv

Repeated nested CV

smote

SMOTE

stat_filter

Univariate filter for binary classification with mixed predictor datat...

summary_vars

Summarise variables

supervisedPCA

Supervised PCA plot

train_preds

Outer training fold predictions

train_roc

Build ROC curve from outer CV training folds

train_summary

Summarise performance on outer training folds

ttest_filter

Univariate filters

txtProgressBar2

Text Progress Bar 2

var_direction

Variable directionality

var_stability

Variable stability

weight

Calculate weights for class imbalance

Implements nested k*l-fold cross-validation for lasso and elastic-net regularised linear models via the 'glmnet' package and other machine learning models via the 'caret' package. Cross-validation of 'glmnet' alpha mixing parameter and embedded fast filter functions for feature selection are provided. Described as double cross-validation by Stone (1977) <doi:10.1111/j.2517-6161.1977.tb01603.x>. Also implemented is a method using outer CV to measure unbiased model performance metrics when fitting Bayesian linear and logistic regression shrinkage models using the horseshoe prior over parameters to encourage a sparse model as described by Piironen & Vehtari (2017) <doi:10.1214/17-EJS1337SI>.

  • Maintainer: Myles Lewis
  • License: MIT + file LICENSE
  • Last published: 2024-08-16