com.rapidminer.operator.features.selection
Class RouletteWheel

java.lang.Object
  extended by com.rapidminer.operator.features.selection.RouletteWheel
All Implemented Interfaces:
PopulationOperator
Direct Known Subclasses:
BoltzmannSelection

public class RouletteWheel
extends java.lang.Object
implements PopulationOperator

Selects a given fixed number of individuals by subdividing a roulette wheel in sections of size proportional to the individuals' fitness values. Optionally keep the best individual.

Author:
Simon Fischer, Ingo Mierswa

Constructor Summary
RouletteWheel(int popSize, boolean keepBest, java.util.Random random)
           
 
Method Summary
 double filterFitness(double fitness)
          Subclasses may override this method and recalculate the fitness based on the given one, e.g.
 void operate(Population population)
          Modifies the population.
 boolean performOperation(int generation)
          The default implementation returns true for every generation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouletteWheel

public RouletteWheel(int popSize,
                     boolean keepBest,
                     java.util.Random random)
Method Detail

performOperation

public boolean performOperation(int generation)
The default implementation returns true for every generation.

Specified by:
performOperation in interface PopulationOperator

filterFitness

public double filterFitness(double fitness)
Subclasses may override this method and recalculate the fitness based on the given one, e.g. Boltzmann selection or scaled selection. The default implementation simply returns the given fitness.


operate

public void operate(Population population)
Description copied from interface: PopulationOperator
Modifies the population.

Specified by:
operate in interface PopulationOperator


Copyright © 2001-2009 by Rapid-I