Learn R Programming

seriation (version 1.4.2)

register_GA: Register a Genetic Algorithm Seriation Method

Description

Register a GA-based seriation metaheuristic for use with seriate().

Usage

register_GA()

gaperm_mixedMutation(ismProb = 0.8)

Value

Nothing.

Arguments

ismProb

probability to use GA::gaperm_ismMutation() (inversion) versus GA::gaperm_simMutation() (simple insertion).

Author

Michael Hahsler

Details

Registers the method "GA" for seriate(). This method can be used to optimize any criterion in package seriation.

control for seriate with method "GA" accepts the following parameters:

  • "criterion" criterion to optimize. Default: BAR

  • "suggestions" suggestions to warm start the GA. NA means no warm start. Default: TSP, QAP_LS and Spectral.

  • "selection" Selection operator.

  • "crossover" Crossover operator.

  • "mutation" Mutation operator. Default: a mixture of the simple insertion (80% chance) and simple inversion (20% chance) operators.

  • "pmutation" probability for permutations. Default: .5

  • "pcrossover" probability for crossover. Default: .2

  • "popsize" the population size. Default: 100

  • "maxiter" maximum number of generations. Default: 1000

  • "run" stop after run generations without improvement. Default: 50

  • "parallel" use multiple cores? Default: TRUE

  • "verbose" a logical; report progress? Default: TRUE

The GA uses by default the ordered cross-over (OX) operator. For mutation, the GA uses a mixture of simple insertion and simple inversion operators. This mixed operator is created using seriation::gaperm_mixedMutation(ismProb = .8), where ismProb is the probability that the simple insertion mutation operator is used. See package GA for a description of other available cross-over and mutation operators for permutations. The appropriate operator functions in GA start with gaperm_.

We warm start the GA using "suggestions" given by several heuristics. Set "suggestions" to NA to start with a purely random initial population.

Note: Package GA needs to be installed.

References

Luca Scrucca (2013): GA: A Package for Genetic Algorithms in R. Journal of Statistical Software, 53(4), 1--37. URL tools:::Rd_expr_doi("10.18637/jss.v053.i04").

See Also

Other seriation: register_DendSer(), register_optics(), register_tsne(), register_umap(), registry_seriate, seriate()

Examples

Run this code

if (FALSE) {
register_GA()
get_seriation_method("dist", "GA")

d <- dist(random.robinson(50, pre=TRUE, noise=.1))

## use default settings: Banded AR form
o <- seriate(d, "GA")
pimage(d, o)

## optimize for linear sertiation criterion (LS)
o <- seriate(d, "GA", control = list(criterion = "LS"))
pimage(d, o)

## no warm start
o <- seriate(d, "GA", control = list(criterion = "LS", suggestions = NA))
pimage(d, o)
}

Run the code above in your browser using DataLab