Learn R Programming

corehunter (version 3.0.1)

getNormalizationRanges: Determine normalization ranges of all objectives in a multi-objective configuration.

Description

Executes an independent stochastic hill-climbing search per objective (in parallel) to approximate the optimal solution for each objective from which a suitable normalization range is inferred based on the Pareto minima/maxima. For an objective that is being maximized, the upper bound is set to the value of the best solution for that objective, while the lower bound is set to the Pareto minimum, i.e. the minimum value obtained when evaluating all optimal solutions with the considered objective. For an objective that is being minimized, the roles of upper and lower bound are interchanged, and the Pareto maximum is used instead.

Usage

getNormalizationRanges(data, obj, size = 0.2, mode = c("default", "fast"), time = NA, impr.time = NA)

Arguments

data
Core Hunter data (chdata) containing genotypes, phenotypes and/or a precomputed distance matrix. Can also be an object of class chdist, chgeno or chpheno if only one type of data is provided.
obj
List of objectives (chobj). If no objectives are specified Core Hunter maximizes a weighted index including the default entry-to-nearest-entry distance (EN) for each available data type. For genotyes, the Modified Roger's distance (MR) is used. For phenotypes, Gower's distance (GD) is applied.
size
Desired core subset size (numeric). If larger than one the value is used as the absolute core size after rounding. Else it is used as the sampling rate and multiplied with the dataset size to determine the size of the core. The default sampling rate is 0.2.
mode
Execution mode (default or fast). In default mode, the normalization searches terminate when no improvement is found for ten seconds. In fast mode, searches terminated as soon as no improvement is made for two seconds. Stop conditions can be overriden with arguments time and impr.time.
time
Absolute runtime limit in seconds. Not used by default. If used it should be a strictly positive value and is rounded to the nearest integer.
impr.time
Maximum time without improvement in seconds. When set to NA a default value is set depending on the execution mode. If set to another value it should be strictly positive and is rounded to the nearest integer.

Value

Numeric matrix with one row per objective and two columns:

See Also

coreHunterData, objective

Examples

Run this code

data <- exampleData()

# maximize entry-to-nearest-entry distance between genotypes and phenotypes (equal weight)
objectives <- list(objective("EN", "MR"), objective("EN", "GD"))
# get normalization ranges for default size (20%)
ranges <- getNormalizationRanges(data, obj = objectives, mode = "fast")

# set normalization ranges and sample core
objectives <- lapply(1:2, function(o){setRange(objectives[[o]], ranges[o,])})
sampleCore(data, obj = objectives)


Run the code above in your browser using DataLab