Learn R Programming

⚠️There's a newer version (4.0.1) of this package.Take me there.

caretEnsemble: (Read the vignette!)

Framework for fitting multiple caret models using the same re-sampling strategy as well as creating ensembles of such models. Use caretList to fit multiple models, and then use caretEnsemble to combine them greedily, or caretStack to combine them using a caret model.

caretEnsemble was inspired by medley, which in turn was inspired by Caruana et. al.'s (2004) paper Ensemble Selection from Libraries of Models.

Install the stable version from CRAN:

install.packages('caretEnsemble')

Install the dev version from github:

devtools::install_github('zachmayer/caretEnsemble')

There are also tagged versions of caretEnsemble on github you can install via devtools. For example, to install the original draft of the API:

devtools::install_github('zachmayer/caretEnsemble@0.0')

Code of Conduct:

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Copy Link

Version

Install

install.packages('caretEnsemble')

Monthly Downloads

3,510

Version

2.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Zachary A Mayer

Last Published

February 7th, 2016

Functions in caretEnsemble (2.0.0)

extractModFrame

Extract a dataframe of all predictors used in a caretEnsemble object.
wtd.sd

Calculate a weighted standard deviation
residuals.caretEnsemble

Calculate the residuals from a caretEnsemble.
extractCaretTarget.default

Extracts the target variable from a set of arguments headed to the caret::train.default function.
check_bestpreds_preds

Check predictions
getMetric

Extract accuracy metrics from a model
multiResiduals

Calculate the residuals from all component models of a caretEnsemble.
caretList

models.class

caretList of classification models
predict.caretStack

Make predictions from a caretStack
methodCheck

Check that the methods supplied by the user are valid caret methods
plot.caretStack

Plot a caretStack object
autoplot

Convenience function for more in-depth diagnostic plots of caretEnsemble objects
extractModelTypes

Extracts the model types from a list of train model
extractModRes

Extract the model accuracy metrics of the individual models in an ensemble object.
is.caretEnsemble

Check if an object is a caretEnsemble object
summary.caretStack

Summarize a caretStack object
bestPreds

Extract the best predictions from a train object
fortify

Supplement the data fitted to a caret ensemble model with model fit statistics
predict.caretList

Create a matrix of predictions for each of the models in a caretList
caretEnsemble

caretEnsemble: Make ensembles of caret models.
makePredObsMatrix

Make a prediction matrix from a list of models
check_bestpreds_resamples

Check resamples
check_bestpreds_indexes

Check row indexes
varImp.caretEnsemble

Calculate the variable importance of variables in a caretEnsemble.
extractBestPreds

Extract the best predictions from a list of train objects
summary.caretEnsemble

Summarize the results of caretEnsemble for the user.
is.caretList

Check if an object is a caretList object
check_caretList_classes

Checks caretList model classes
extractCaretTarget

Extracts the target variable from a set of arguments headed to the caret::train function.
is.caretStack

Check if an object is a caretStack object
dotplot.caretStack

Comparison dotplot for a caretStack object
trControlCheck

Check that the trainControl object supplied by the user is valid and has defined re-sampling indexes.
caretStack

Combine several predictive models via stacking
check_caretList_model_types

Checks that caretList models are all of the same type.
extractCaretTarget.formula

Extracts the target variable from a set of arguments headed to the caret::train.formula function.
plot.caretEnsemble

Plot Diagnostics for an caretEnsemble Object
print.caretStack

Print a caretStack object
tuneCheck

Check that the tuning parameters list supplied by the user is valid
c.train

S3 definition for concatenating train objects
caretModelSpec

Generate a specification for fitting a caret model
c.caretList

S3 definition for concatenating caretList
check_bestpreds_obs

Check observeds