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

tune.wrapper

Convenience Tuning Wrapper Functions


Description

Convenience tuning wrapper functions, using tune.

Usage

tune.svm(x, y = NULL, data = NULL, degree = NULL, gamma = NULL, coef0 = NULL,
         cost = NULL, nu = NULL, class.weights = NULL, epsilon = NULL, ...)
best.svm(x, tunecontrol = tune.control(), ...)
 
tune.nnet(x, y = NULL, data = NULL, size = NULL, decay = NULL,
          trace = FALSE, tunecontrol = tune.control(nrepeat = 5), 
          ...)
best.nnet(x, tunecontrol = tune.control(nrepeat = 5), ...)

tune.rpart(formula, data, na.action = na.omit, minsplit = NULL,
           minbucket = NULL, cp = NULL, maxcompete = NULL, maxsurrogate = NULL,
           usesurrogate = NULL, xval = NULL, surrogatestyle = NULL, maxdepth =
           NULL, predict.func = NULL, ...)
best.rpart(formula, tunecontrol = tune.control(), ...)

tune.randomForest(x, y = NULL, data = NULL, nodesize = NULL, 
                  mtry = NULL, ntree = NULL, ...)
best.randomForest(x, tunecontrol = tune.control(), ...)

tune.knn(x, y, k = NULL, l = NULL, ...)

Arguments

formula, x, y, data

formula and data arguments of function to be tuned.

predict.func

predicting function.

na.action

function handling missingness.

minsplit, minbucket, cp, maxcompete, maxsurrogate, usesurrogate, xval, surrogatestyle, maxdepth

rpart parameters.

degree, gamma, coef0, cost, nu, class.weights, epsilon

svm parameters.

k, l

knn parameters.

mtry, nodesize, ntree

randomForest parameters.

size, decay, trace

parameters passed to nnet.

tunecontrol

object of class "tune.control" containing tuning parameters.

...

Further parameters passed to tune.

Details

For examples, see the help page of tune().

Value

tune.foo() returns a tuning object including the best parameter set obtained by optimizing over the specified parameter vectors. best.foo() directly returns the best model, i.e. the fit of a new model using the optimal parameters found by tune.foo.

Author(s)

See Also


e1071

Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien

v1.7-11
GPL-2 | GPL-3
Authors
David Meyer [aut, cre], Evgenia Dimitriadou [aut, cph], Kurt Hornik [aut], Andreas Weingessel [aut], Friedrich Leisch [aut], Chih-Chung Chang [ctb, cph] (libsvm C++-code), Chih-Chen Lin [ctb, cph] (libsvm C++-code)
Initial release

We don't support your browser anymore

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