plotFront {ecr}R Documentation

Plot Pareto-front.

Description

Plots a scatterplot of non-dominated points in the objective space utilizing the ggplot2 package. The function returns a ggplot object which can be furhter modified via additional ggplot layers. If the passed object is a data.frame, each line is considered to contain the fitness values of one individual. Contrary, if a matrix is passed, it is considered to be passed in ecr2 format, i.e., each column corresponds to one point. The matrix is then transposed and converted to a data.frame.

Usage

plotFront(x, obj.names = NULL, minimize = TRUE)

Arguments

x

[matrix | data.frame]
Object which contains the non-dominated points.

obj.names

[character]
Optional objectives names. Default is c("f1", "f2").

minimize

[logical]
Logical vector with ith entry TRUE if the ith objective shall be minimized. If a single logical is passed, it is assumed to be valid for each objective. If the matrix is of type ecr_fitness_matrix (this is the case if it is produced by one of ecr2's utility functions, e.g. evaluateFitness), the appended minimize attribute is the default.

Value

[ggplot] ggplot object.

Note

At the moment only two-dimensional objective spaces are supported.

Examples

matrix

[Package ecr version 2.1.0 Index]