Learn R Programming

rtemis (version 0.79)

s.MARS: Multivariate adaptive regression splines (MARS) [C, R]

Description

Trains a MARS model using earth::earth. For more info on algorithm hyperparameters, see ?earth::earth

Usage

s.MARS(x, y = NULL, x.test = NULL, y.test = NULL, x.name = NULL,
  y.name = NULL, grid.resample.rtset = rtset.grid.resample(),
  weights = NULL, ipw = TRUE, ipw.type = 2, upsample = FALSE,
  upsample.seed = NULL, glm = NULL, degree = 2, penalty = 3,
  nk = NULL, thresh = 0, minspan = 0, endspan = 0,
  newvar.penalty = 0, fast.k = 2, fast.beta = 1, linpreds = FALSE,
  pmethod = "forward", nprune = NULL, nfold = 4, ncross = 1,
  stratify = TRUE, wp = NULL, na.action = na.fail, metric = NULL,
  maximize = NULL, n.cores = rtCores, print.plot = TRUE,
  plot.fitted = NULL, plot.predicted = NULL,
  plot.theme = getOption("rt.fit.theme", "lightgrid"), question = NULL,
  verbose = TRUE, trace = 0, save.mod = FALSE, outdir = NULL, ...)

Arguments

x

Numeric vector or matrix of features, i.e. independent variables

y

Numeric vector of outcome, i.e. dependent variable

x.test

(Optional) Numeric vector or matrix of validation set features must have set of columns as x

y.test

(Optional) Numeric vector of validation set outcomes

degree

[gS] Integer: Maximum degree of interaction. Default = 2

penalty

[gS] Float: GCV penalty per knot. 0 penalizes only terms, not knots. -1 means no penalty. Default = 3

nk

[gS] Integer: Maximum number of terms created by the forward pass. See earth::earth

pmethod

[gS] String: Pruning method: "backward", "none", "exhaustive", "forward", "seqrep", "cv". Default = "forward"

nprune

[gS] Integer: Max N of terms (incl. intercept) in the pruned model

...

Additional parameters to pass to earth::earth

Value

Object of class rtMod

See Also

elevate for external cross-validation

Other Supervised Learning: s.ADABOOST, s.ADDTREE, s.BART, s.BAYESGLM, s.BRUTO, s.C50, s.CART, s.CTREE, s.DA, s.ET, s.EVTREE, s.GAM.default, s.GAM.formula, s.GAMSEL, s.GAM, s.GBM3, s.GBM, s.GLMNET, s.GLM, s.GLS, s.H2ODL, s.H2OGBM, s.H2ORF, s.IRF, s.KNN, s.LDA, s.LM, s.MLRF, s.MXN, s.NBAYES, s.NLA, s.NLS, s.NW, s.POLYMARS, s.PPR, s.PPTREE, s.QDA, s.QRNN, s.RANGER, s.RFSRC, s.RF, s.SGD, s.SPLS, s.SVM, s.TFN, s.XGBLIN, s.XGB