Skip to content

Plots

ypea.plot.convergence

Best objective value against evaluations or iterations.

ax = ypea.plot.convergence(result1, result2, ..., x="nfe", log=[], ax=[], labels=[], error=false)

Draws one line per ypea.Result: the best value against the number of
evaluations (x="nfe", a step line, since the best value holds from the
evaluation that found it onward) or against the iteration (x="iter").
error=true draws the distance to the known optimum. log defaults to true
when all values are positive. labels names the lines (default: the
algorithm names). Returns the axes.

ypea.plot.band

Convergence over several runs: a center line and a band of the middle half.

ax = ypea.plot.band(x, curves, center="median", log=[], ax=[], xlabel="Function evaluations",
                    ylabel="Error", title="")

curves is a cell of label, value pairs, {"DE", Y1, "PSO", Y2}, or a struct
with one field per label. Each value has one row per run and one column
per entry of x. Draws the median (or the mean, center="mean") of the runs
and a band from the 25th to the 75th percentile. log defaults to true
when the values are positive and span more than a factor of 10. Returns
the axes.

ypea.plot.boxes

Box plots of final values, one box per label.

ax = ypea.plot.boxes(samples, log=[], ax=[], ylabel="Final error", title="")

samples is a cell of label, value pairs, {"DE", v1, "PSO", v2}, or a
struct with one field per label, each holding the values of its runs.
log defaults to true when the values are positive and span more than a
factor of 10. Returns the axes.

ypea.plot.rank_bars

Bar chart of average ranks (lower is better).

ax = ypea.plot.rank_bars(ranks, ax=[], ylabel="Average Friedman rank")

ranks is a cell of label, rank pairs, {"DE", 1.5, "PSO", 2.5}, or a
struct with one field per label. Returns the axes.

ypea.plot.front

Objective vectors of one or more fronts.

ax = ypea.plot.front(F1, F2, ..., true_front=[], labels=[], kind=[], ax=[], objectives=[])

Each front is an n x m array of objective values, a ypea.Front or a
ypea.Result, drawn as given, so maximized objectives are not flipped.
Two objectives give a 2D scatter plot and three a 3D scatter plot. More
objectives, or kind="parallel", give parallel coordinates: one line per
point across the objectives. true_front (for example from
ypea.benchmarks.pareto_front) is drawn in gray behind the fronts.
objectives names the axes (default f_1, f_2, ...). Returns the axes.