generationPlot: Plots input parameter optimization results

View source: R/estimation.r

generationPlotR Documentation

Plots input parameter optimization results

Description

Plots the evolution of the optimized solutions (sets of input parameters) along the adjustModel algorithm's generations.

Usage

  generationPlot(solutions, species.model
    , plot.quantiles = c(0.10, 0.5, 0.90), only.pareto = FALSE
    , show.legend = TRUE, lwd = 1.5, mar = c(2.3, 2.3, 0.2, 2.3)
    , mgp = c(1.2, 0.2, 0), tcl = -0.25, ...)

Arguments

solutions

the result of adjustModel.

species.model

the species model that was adjusted and that was passed to adjustModel.

plot.quantiles

the three quantiles to plot. The middle is plotted as a solid line, the extremes define the shaded area.

only.pareto

whether to display the quantiles only of the Pareto front (TRUE) or of all solutions (FALSE).

show.legend

whether to show a legend indicating the correspondence of colors - input parameters.

lwd

line width to be used to draw the middle quantile (usually the median).

mar, mgp, tcl, ...

arguments to pass to par.

Details

The generation plot depicts, for each generation of the optimization algorithm, the given quantiles of each input parameter being optimized in the population of solutions. This is not the ideal plot because input parameters are plotted independently, while they are only supposed to make sense in the context of a given solution (i.e. it is the combination of the input parameters that is being optimized, not the parameters in isolation).

Nonetheless, this plot is still a good way to assess whether the final solutions converged to stable values, which can indicate that the algorithm succeeded in replicating the real trajectory provided. However, note that depending on how the problem is formulated, the solutions might not be expected to converge to a single solution "type": for example, there can be two types of solutions, corresponding to two different ways of achieving similar results.

Value

Returns, invisibly, a 3-D matrix with the computed quantiles for all input parameters along generations.

See Also

adjustModel.

Examples

## see ?adjustModel for a complete example

miguel-porto/SiMRiv documentation built on Sept. 19, 2023, 2:47 a.m.