recalculateParetoSet | R Documentation |
Recalculates the Pareto-optimal solutions in a TuneParetoResult
according to the specified objectives only, and returns another TuneParetoResult
object reduced to these objectives. This avoids time-consuming recalculations of objective values if only a subset of objectives should be considered for a previously evaluated set of parameter combinations.
recalculateParetoSet(tuneParetoResult,
objectives)
tuneParetoResult |
The |
objectives |
A vector of objective function indices. The Pareto set is recalculated according to these objectives, i.e. omitting other objectives. If this argument is not supplied, all objectives are used, which usually returns a copy of the input. |
Returns a reduced TuneParetoResult
object. For more details on the object structure, refer to tunePareto
.
tunePareto
, mergeTuneParetoResults
# optimize the 'cost' parameter of an SVM on
# the 'iris' data set
res <- tunePareto(classifier = tunePareto.svm(),
data = iris[, -ncol(iris)],
labels = iris[, ncol(iris)],
cost=seq(0.01,0.1,0.01),
objectiveFunctions=list(cvWeightedError(10, 10),
cvSensitivity(10, 10, caseClass="setosa"),
cvSpecificity(10, 10, caseClass="setosa")))
print(res)
# select only specificity and sensitivity
print(recalculateParetoSet(res, 2:3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.