computeCumulatedPathLengths: Compute the Cumulated Path Lengths.

Description Usage Arguments Value Note Examples

View source: R/computeCumulatedPathLengths.R

Description

Given a grid of points in the search space, along with their corresponding multi-objective gradients, this function will compute (for each point of the grid) the length of the cumulated path from a point towards its attracting local efficient point.

Usage

1
2
computeCumulatedPathLengths(centers, gradients,
  prec.vector.length = 0.001, prec.norm = 1e-06, check.data = TRUE)

Arguments

centers

[matrix]
Matrix containing the points of a grid of cells, for which the lengths of cumulated gradient paths should be computed. Each row corresponds to a single point.

gradients

[matrix]
Matrix containing the multi-objective gradients for each point of centers.

prec.vector.length

[numeric(1L)]
Precision value (= threshold) for the length of the multi-objective gradient. Based on this threshold, the function will classify the corresponding point as locally efficient (or not). The default value is 1e-3.

prec.norm

[numeric(1L)]
Precision threshold when normalizing a vector. That is, every element of the vector, whose absolute value is below this threshold, will be replaced by 0. The default is 1e-6.

check.data

[logical(1L)]
Should sanity checks be performed? The default is TRUE. Note that the checks should only be turned off (e.g., for a slight speed up), if you are sure that you provide the input data in the correct format.

Value

[data.frame]
Returns a data.frame, which appends the cumulated path lengths to the points provided by centers.

Note

ATTENTION: Only turn off the sanity checks (check.data = FALSE), if you can ensure that all input parameters are provided in the correct format.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Define two single-objective test problems:
fn1 = function(x) sum((x - c(0.2, 1))^2)
fn2 = function(x) sum((x - c(0.5, 0.5))^2)

# Define a grid of points:
points = as.matrix(expand.grid(x1 = seq(0, 0.7, 0.005), x2 = seq(0, 1.25, 0.005)))

# Compute the corresponding gradients:
gradients = computeGradientField(points, fn1, fn2)

# Now, compute the cumulated path lengths:
x = computeCumulatedPathLengths(points, gradients)

# Finally, we can visualize the resulting multi-objective "landscape":
ggplotHeatmap(x, hide.legend = TRUE)

kerschke/mogsa documentation built on Oct. 27, 2018, 12:13 a.m.