calculateFeatureSet {flacco}R Documentation

Calculate Landscape Features

Description

Performs an Exploratory Landscape Analysis of a continuous function and computes various features, which quantify the function's landscape. Currently, the following feature sets are provided:

Usage

calculateFeatureSet(feat.object, set, control, ...)

calculateFeatures(feat.object, control, ...)

Arguments

feat.object

[FeatureObject]
A feature object as created by createFeatureObject.

set

[character(1)]
Name of the feature set, which should be computed. All possible feature sets can be listed using listAvailableFeatureSets.

control

[list]
A list, which stores additional control arguments. For further information, see details.

...

[any]
Further arguments, e.g. handled by optim (within the computation of the ELA local search features) or density (within the computation of the ELA y-distribution features).

Details

Note that if you want to speed up the runtime of the features, you might consider running your feature computation parallelized. For more information, please refer to the parallelMap package or to https://mlr.mlr-org.com/articles/tutorial/parallelization.html.

Furthermore, please consider adapting the feature computation to your needs. Possible control arguments are:

Value

list of (numeric) features:

References

Examples

# (1) create a feature object:
X = t(replicate(n = 2000, expr = runif(n = 5, min = -10, max = 10)))
## Not run: feat.object = createFeatureObject(X = X, fun = function(x) sum(x^2))

# (2) compute all non-cellmapping features
ctrl = list(allow_cellmapping = FALSE)
## Not run: features = calculateFeatures(feat.object, control = ctrl)

# (3) in order to allow the computation of the cell mapping features, one
# has to provide a feature object that has knowledge about the number of
# cells per dimension:
f = function(x) sum(x^2)
feat.object = createFeatureObject(X = X, fun = f, blocks = 3)
## Not run: features = calculateFeatures(feat.object)

# (4) if you want to compute a specific feature set, you can use
# calculateFeatureSet:
features.angle = calculateFeatureSet(feat.object, "cm_angle")

# (5) as noted in the details, it might be useful to compute the levelset
# features parallelized:
## Not run: 
library(parallelMap)
library(parallel)
n.cores = detectCores()
parallelStart(mode = "socket", cpus = n.cores,
  logging = FALSE, show.info = FALSE)
system.time((levelset.par = calculateFeatureSet(feat.object, "ela_level")))
parallelStop()
system.time((levelset.seq = calculateFeatureSet(feat.object, "ela_level")))
## End(Not run)


[Package flacco version 1.8 Index]