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

EarthModel

Multivariate Adaptive Regression Splines Model


Description

Build a regression model using the techniques in Friedman's papers "Multivariate Adaptive Regression Splines" and "Fast MARS".

Usage

EarthModel(
  pmethod = c("backward", "none", "exhaustive", "forward", "seqrep", "cv"),
  trace = 0,
  degree = 1,
  nprune = NULL,
  nfold = 0,
  ncross = 1,
  stratify = TRUE
)

Arguments

pmethod

pruning method.

trace

level of execution information to display.

degree

maximum degree of interaction.

nprune

maximum number of terms (including intercept) in the pruned model.

nfold

number of cross-validation folds.

ncross

number of cross-validations if nfold > 1.

stratify

logical indicating whether to stratify cross-validation samples by the response levels.

Details

Response Types:

factor, numeric

Automatic Tuning of Grid Parameters:

nprune, degree*

* included only in randomly sampled grid points

Default values for the NULL arguments and further model details can be found in the source link below.

In calls to varimp for EarthModel, argument metric may be specified as "gcv" (default) for the generalized cross-validation decrease over all subsets that include each predictor, as "rss" for the residual sums of squares decrease, or as "nsubsets" for the number of model subsets that include each predictor. Variable importance is automatically scaled to range from 0 to 100. To obtain unscaled importance values, set scale = FALSE. See example below.

Value

MLModel class object.

See Also

Examples

## Requires prior installation of suggested package earth to run

model_fit <- fit(Species ~ ., data = iris, model = EarthModel)
varimp(model_fit, metric = "nsubsets", scale = FALSE)

MachineShop

Machine Learning Models and Tools

v2.8.0
GPL-3
Authors
Brian J Smith [aut, cre]
Initial release
2021-04-16

We don't support your browser anymore

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