com.rapidminer.operator.features.construction
Class ExampleSetBasedPopulation

java.lang.Object
  extended by com.rapidminer.operator.features.construction.ExampleSetBasedPopulation

public class ExampleSetBasedPopulation
extends java.lang.Object

A set of individuals. Stores generation number and best individuals.

Author:
Ingo Mierswa

Field Summary
static java.util.Comparator<ExampleSetBasedIndividual> PERFORMANCE_COMPARATOR
           
 
Constructor Summary
ExampleSetBasedPopulation()
          Construct an empty generation.
 
Method Summary
 void add(ExampleSetBasedIndividual individual)
          Adds a single individual.
 void addAllIndividuals(java.util.Collection<ExampleSetBasedIndividual> newIndividuals)
          Adds all individuals from the given collection.
 void clear()
          Removes all individuals.
 boolean empty()
          Returns true is the population contains no individuals.
 ExampleSetBasedIndividual get(int i)
          Returns a single individual.
 ExampleSetBasedIndividual getBestIndividualEver()
          Returns all generations' best individual.
 PerformanceVector getBestPerformanceEver()
          Returns the best performance.
 ExampleSetBasedIndividual getCurrentBest()
          Returns the last generation's best individual.
 PerformanceVector getCurrentBestPerformance()
          Returns the last generation's best performance.
 int getGeneration()
          Returns the current number of the generation.
 int getGenerationsWithoutImproval()
          Returns the number of generations without improval.
 int getNumberOfIndividuals()
          Returns the number of all individuals.
 void nextGeneration()
          Increase the generation number by one.
 void remove(ExampleSetBasedIndividual individual)
          Removes a single individual.
 void remove(int i)
          Removes a single individual.
 void sort()
          Sorts the individuals in ascending order according to their performance, thus the best one will be in last position.
 java.lang.String toString()
           
 void updateEvaluation()
          Remember the current generation's best individual and update the best individual.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PERFORMANCE_COMPARATOR

public static final java.util.Comparator<ExampleSetBasedIndividual> PERFORMANCE_COMPARATOR
Constructor Detail

ExampleSetBasedPopulation

public ExampleSetBasedPopulation()
Construct an empty generation.

Method Detail

clear

public void clear()
Removes all individuals.


add

public void add(ExampleSetBasedIndividual individual)
Adds a single individual.


addAllIndividuals

public void addAllIndividuals(java.util.Collection<ExampleSetBasedIndividual> newIndividuals)
Adds all individuals from the given collection.


remove

public void remove(ExampleSetBasedIndividual individual)
Removes a single individual.


remove

public void remove(int i)
Removes a single individual.


get

public ExampleSetBasedIndividual get(int i)
Returns a single individual.


getNumberOfIndividuals

public int getNumberOfIndividuals()
Returns the number of all individuals.


empty

public boolean empty()
Returns true is the population contains no individuals.


nextGeneration

public void nextGeneration()
Increase the generation number by one.


getGeneration

public int getGeneration()
Returns the current number of the generation.


getGenerationsWithoutImproval

public int getGenerationsWithoutImproval()
Returns the number of generations without improval.


updateEvaluation

public void updateEvaluation()
Remember the current generation's best individual and update the best individual.


getBestPerformanceEver

public PerformanceVector getBestPerformanceEver()
Returns the best performance.


getBestIndividualEver

public ExampleSetBasedIndividual getBestIndividualEver()
Returns all generations' best individual.


getCurrentBest

public ExampleSetBasedIndividual getCurrentBest()
Returns the last generation's best individual.


getCurrentBestPerformance

public PerformanceVector getCurrentBestPerformance()
Returns the last generation's best performance.


sort

public void sort()
Sorts the individuals in ascending order according to their performance, thus the best one will be in last position.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 by Rapid-I