Class containing optimization results.
Source:R/generics.R, R/doe-optimizer.R
optimizationResult-class.RdObjects from this class contain optimization results resulting from design of experiment (DoE).
Usage
optimizedParameters(object, paramSet = NULL, DoEIteration = NULL)
optimizedObject(object, paramSet = NULL)
scores(object, paramSet = NULL, DoEIteration = NULL)
experimentInfo(object, paramSet, DoEIteration)
# S4 method for class 'optimizationResult'
algorithm(obj)
# S4 method for class 'optimizationResult'
length(x)
# S4 method for class 'optimizationResult'
lengths(x, use.names = FALSE)
# S4 method for class 'optimizationResult'
show(object)
# S4 method for class 'optimizationResult,missing'
plot(
x,
paramSet,
DoEIteration,
paramsToPlot = NULL,
maxCols = NULL,
type = "contour",
image = TRUE,
contours = "colors",
...
)
# S4 method for class 'optimizationResult'
optimizedParameters(object, paramSet = NULL, DoEIteration = NULL)
# S4 method for class 'optimizationResult'
optimizedObject(object, paramSet = NULL)
# S4 method for class 'optimizationResult'
scores(object, paramSet = NULL, DoEIteration = NULL)
# S4 method for class 'optimizationResult'
experimentInfo(object, paramSet, DoEIteration)Arguments
- paramSet
Numeric index of the parameter set (i.e. the first parameter set gets index 1). For some methods optional: if
NULLthe best will be selected.- DoEIteration
Numeric index specifying the DoE iteration within the specified
paramSet. For some methods optional: ifNULLthe best will be selected.- obj, x, object
An
optimizationResultobject.- use.names
Ignored.
- paramsToPlot
Which parameters relations should be plot. If
NULLall will be plot. Alternatively, alistcontaining one or morecharactervectors specifying each two parameters that should be plotted. Finally, if only one pair should be plotted, can be acharactervector specifying both parameters.- maxCols
Multiple parameter pairs are plotted in a grid. The maximum number of columns can be set with this argument. Set to
NULLfor no limit.- type
The type of plots to be generated:
"contour","image"or"persp". The equally named functions will be called for plotting.- image
Passed to
contour(iftype="contour").- contours
Passed to
persp(iftype="persp").- ...
Further arguments passed to
contour,imageorpersp(depending ontype).
Details
Objects from this class are returned by optimizeFeatureFinding and
optimizeFeatureGrouping.
Methods (by generic)
algorithm(optimizationResult): Returns the algorithm that was used for finding features.length(optimizationResult): Obtain total number of experimental design iterations performed.lengths(optimizationResult): Obtain number of experimental design iterations performed for each parameter set.show(optimizationResult): Shows summary information for this object.plot(x = optimizationResult, y = missing): Generates response plots for all or a selected set of parameters.optimizedParameters(optimizationResult): Returns parameter set yielding optimal results. TheparamSetandDoEIterationarguments can beNULL.optimizedObject(optimizationResult): Returns the object (i.e. afeaturesorfeatureGroupsobject) that was generated with optimized parameters. TheparamSetargument can beNULL.scores(optimizationResult): Returns optimization scores. TheparamSetandDoEIterationarguments can beNULL.experimentInfo(optimizationResult): Returns alistwith optimization information from an DoE iteration.
Slots
algorithmA character specifying the algorithm that was optimized.
paramSetsA
listwith detailed results from each parameter set that was tested.bestParamSetNumeric index of the parameter set yielding the best response.
Examples
if (FALSE) { # \dontrun{
# ftOpt is an optimization object.
# plot contour of all parameter pairs from the first parameter set/iteration.
plot(ftOpt, paramSet = 1, DoEIteration = 1)
# as above, but only plot two parameter pairs
plot(ftOpt, paramSet = 1, DoEIteration = 1,
paramsToPlot = list(c("mzPPM", "chromFWHM"), c("chromFWHM", "chromSNR")))
# plot 3d perspective plots
plot(ftOpt, paramSet = 1, DoEIteration = 1, type = "persp")
} # }