Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelLookup

Tools for Models Available in train


Description

These function show information about models and packages that are accessible via train

Usage

modelLookup(model = NULL)

checkInstall(pkg)

getModelInfo(model = NULL, regex = TRUE, ...)

Arguments

model

a character string associated with the method argument of train. If no value is passed, all models are returned. For getModelInfo, regular expressions can be used.

pkg

a character string of package names.

regex

a logical: should a regular expressions be used? If FALSE, a simple match is conducted against the whole name of the model.

...

options to pass to grepl

Details

modelLookup is good for getting information related to the tuning parameters for a model. getModelInfo will return all the functions and metadata associated with a model. Both of these functions will only search within the models bundled in this package.

checkInstall will check to see if packages are installed. If they are not and the session is interactive, an option is given to install the packages using install.packages using that functions default arguments (the missing packages are listed if you would like to install them with other options). If the session is not interactive, an error is thrown.

Value

modelLookup produces a data frame with columns

model

a character string for the model code

parameter

the tuning parameter name

label

a tuning parameter label (used in plots)

forReg

a logical; can the model be used for regression?

forClass

a logical; can the model be used for classification?

probModel

a logical; does the model produce class probabilities?

getModelInfo returns a list containing one or more lists of the standard model information.

checkInstall returns not value.

Note

The column seq is no longer included in the output of modelLookup.

Author(s)

Max Kuhn

See Also

Examples

## Not run: 
modelLookup()
modelLookup("gbm")

getModelInfo("pls")
getModelInfo("^pls")
getModelInfo("pls", regex = FALSE)

checkInstall(getModelInfo("pls")$library)

## End(Not run)

caret

Classification and Regression Training

v6.0-86
GPL (>= 2)
Authors
Max Kuhn [aut, cre], Jed Wing [ctb], Steve Weston [ctb], Andre Williams [ctb], Chris Keefer [ctb], Allan Engelhardt [ctb], Tony Cooper [ctb], Zachary Mayer [ctb], Brenton Kenkel [ctb], R Core Team [ctb], Michael Benesty [ctb], Reynald Lescarbeau [ctb], Andrew Ziem [ctb], Luca Scrucca [ctb], Yuan Tang [ctb], Can Candan [ctb], Tyler Hunt [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.