plotScatter2d: Visualize bi-objective Pareto-front approximations.

View source: R/PA.EMOA.plotScatter2d.R

plotScatter2dR Documentation

Visualize bi-objective Pareto-front approximations.

Description

Given a data frame with the results of (multiple) runs of (multiple) different multi-objective optimization algorithms on (multiple) problem instances the function generates ggplot plots of the obtained Pareto-front approximations.

Usage

plotScatter2d(
  df,
  obj.cols = c("f1", "f2"),
  shape = "algorithm",
  colour = NULL,
  highlight.algos = NULL,
  offset.highlighted = 0,
  title = NULL,
  subtitle = NULL,
  facet.type = "wrap",
  facet.args = list()
)

Arguments

df

[data.frame]
Data.frame with columns at least obj.cols, “prob” and “algorithm”.

obj.cols

[character(>= 2)]
Column names of the objective functions. Default is c("f1", "f2").

shape

[character(1)]
Name of column which shall be used to define shape of points. Default is “algorithm”.

colour

[character(1)]
Name of column which shall be used to define colour of points. Default is NULL, i.e., coloring is deactivated.

highlight.algos

[character(1)]
Name of algorithm to highlight exclusively. Useful to highlight, e.g., the true Pareto-optimal front (if known) or some reference set. Default is NULL, i.e., unknown.

offset.highlighted

[numeric(1)]
Numeric offset used to shift set (see highlight.algos) which should be highlighted. Even though this produces objective vectors it may be used to make visible reference sets which otherwise would be hidden by overlap of multiple other approximation sets.

title

[character(1)]
Plot title.

subtitle

[character(1)]
Plot subtitle.

facet.type

[character(1)]
Which faceting method to use? Pass “wrap” for facet_wrap or “grid” for facet_grid. Default is “wrap”.

facet.args

[list]
Named list of arguments passed down to facet_wrap or facet_grid respectively (depends on facet.type). E.g., nrow to change layout. Default is the empty list. In this case data is grouped by problem.

Value

[ggplot] A ggplot object.

Note

At the moment only approximations of bi-objective functions are supported.

See Also

Other EMOA performance assessment tools: approximateNadirPoint(), approximateRefPoints(), approximateRefSets(), computeDominanceRanking(), emoaIndEps(), makeEMOAIndicator(), niceCellFormater(), normalize(), plotDistribution(), plotFront(), plotScatter3d(), toLatex()

Examples

## Not run: 
# load examplary data
data(mcMST)
print(head(mcMST))

# no customization; use the defaults
pl = plotFronts(mcMST)

# algo PRIM is obtained by weighted sum scalarization
# Since the front is (mainly) convex we highlight these solutions
pl = plotFronts(mcMST, highlight.algos = "PRIM")

# customize layout
pl = plotFronts(mcMST, title = "Pareto-approximations",
  subtitle = "based on different mcMST algorithms.", facet.args = list(nrow = 2))

## End(Not run)

ecr documentation built on March 31, 2023, 10:07 p.m.