Learn R Programming

rmoo (version 0.3.2)

rmoo_tourSelection: Tournament Selection

Description

Binarily o por pref

Usage

rmoo_tourSelection(object, k = 2, ...)

rmooreal_tourSelection(object, k = 2, ...)

rmoobin_tourSelection(object, k = 2, ...)

rmooperm_tourSelection(object, k = 2, ...)

Value

List with population and fitness subsets.

Arguments

object

MOEA object with slots population, fitness, front, popSize.

k

Tournament size.

...

Argument which all the values necessary for the configuration will be passed as parameters. The user is encouraged to see the documentations.

Examples

Run this code
if (FALSE) {
# Creamos un "dummy" objeto mínimo
object <- list(
  population       = matrix(runif(20), nrow=5),
  fitness          = matrix(runif(10), nrow=5),
  front            = matrix(sample(1:2, 5, TRUE), ncol=1),
  crowdingDistance = runif(5),
  popSize          = 5
)
class(object) <- "nsga2"
# Llamamos al selector
sel <- rmoo_tourSelection(object, k = 2)
str(sel)
}

Run the code above in your browser using DataLab