1\name{tune.control}
2\alias{tune.control}
3\title{Control Parameters for the Tune Function}
4\description{
5  Creates an object of class \code{tune.control} to be used with
6  the \code{tune} function, containing various control parameters.
7}
8\usage{
9tune.control(random = FALSE, nrepeat = 1, repeat.aggregate = mean,
10sampling = c("cross", "fix", "bootstrap"), sampling.aggregate = mean,
11sampling.dispersion = sd,
12cross = 10, fix = 2/3, nboot = 10, boot.size = 9/10, best.model = TRUE,
13performances = TRUE, error.fun = NULL)
14}
15\arguments{
16  \item{random}{if an integer value is specified, \code{random}
17    parameter vectors are drawn from the parameter space.}
18  \item{nrepeat}{specifies how often training shall be repeated.}
19  \item{repeat.aggregate}{function for aggregating the repeated training results.}
20  \item{sampling}{sampling scheme. If \code{sampling = "cross"}, a
21    \code{cross}-times cross validation is performed. If \code{sampling
22      = "boot"}, \code{nboot} training sets of size \code{boot.size} (part)
23    are sampled (with replacement) from the supplied data. If \code{sampling
24      = "fix"}, a single split into training/validation set is
25    used, the training set containing a \code{fix} part of the supplied
26    data. Note that a separate validation set can be supplied via
27    \code{validation.x} and \code{validation.y}. It is only used for
28    \code{sampling = "boot"} and \code{sampling = "fix"}; in the latter
29    case, \code{fix} is set to 1.}
30  \item{sampling.aggregate,sampling.dispersion}{functions for aggregating the training
31    results on the generated training samples (default: mean and
32    standard deviation).}
33  \item{cross}{number of partitions for cross-validation.}
34  \item{fix}{part of the data used for training in fixed sampling.}
35  \item{nboot}{number of bootstrap replications.}
36  \item{boot.size}{size of the bootstrap samples.}
37  \item{best.model}{if \code{TRUE}, the best model is trained and
38    returned (the best parameter set is used for
39    training on the complete training set).}
40  \item{performances}{if \code{TRUE}, the performance results for all
41    parameter combinations are returned.}
42  \item{error.fun}{function returning the error measure to be minimized.
43    It takes two arguments: a vector of true values and a vector of
44    predicted values. If \code{NULL}, the misclassification error is used
45    for categorical predictions and the mean squared error for numeric
46    predictions.}
47}
48\value{
49  An object of class \code{"tune.control"} containing all the above
50  parameters (either the defaults or the user specified values).
51}
52\author{
53  David Meyer\cr
54  \email{David.Meyer@R-project.org}
55}
56\seealso{\code{\link{tune}}}
57\keyword{models}
58