com.rapidminer.operator.features.construction
Class AbstractGeneratingGeneticAlgorithm

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.OperatorChain
              extended by com.rapidminer.operator.features.construction.ExampleSetBasedFeatureOperator
                  extended by com.rapidminer.operator.features.construction.AbstractGeneratingGeneticAlgorithm
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>
Direct Known Subclasses:
GeneratingGeneticAlgorithm, YAGGA

public abstract class AbstractGeneratingGeneticAlgorithm
extends ExampleSetBasedFeatureOperator

In contrast to its superclass GeneticAlgorithm, the GeneratingGeneticAlgorithm generates new attributes and thus can change the length of an individual. Therfore specialized mutation and crossover operators are being applied. Generators are chosen at random from a list of generators specified by boolean parameters.
Since this operator does not contain algorithms to extract features from value series, it is restricted to example sets with only single attributes. For automatic feature extraction from values series the value series plugin for RapidMiner written by Ingo Mierswa should be used. It is available at http://rapid-i.com

Author:
Ingo Mierswa

Field Summary
static int BOLTZMANN_SELECTION
           
static int CUT_SELECTION
           
static int NON_DOMINATED_SORTING_SELECTION
           
static java.lang.String PARAMETER_CROSSOVER_TYPE
           
static java.lang.String PARAMETER_DYNAMIC_SELECTION_PRESSURE
          The parameter name for "If set to true the selection pressure is increased to maximum during the complete optimization run (only Boltzmann and tournament selection).
static java.lang.String PARAMETER_GENERATIONS_WITHOUT_IMPROVAL
          The parameter name for "Stop criterion: Stop after n generations without improval of the performance (-1: perform all generations).
static java.lang.String PARAMETER_KEEP_BEST_INDIVIDUAL
          The parameter name for "If set to true, the best individual of each generations is guaranteed to be selected for the next generation (elitist selection).
static java.lang.String PARAMETER_MAXIMUM_NUMBER_OF_GENERATIONS
          The parameter name for "Number of generations after which to terminate the algorithm.
static java.lang.String PARAMETER_P_CROSSOVER
           
static java.lang.String PARAMETER_P_INITIALIZE
           
static java.lang.String PARAMETER_POPULATION_SIZE
          The parameter name for "Number of individuals per generation.
static java.lang.String PARAMETER_RECIPROCAL_VALUE
           
static java.lang.String PARAMETER_START_TEMPERATURE
          The parameter name for "The scaling temperature (only Boltzmann selection).
static java.lang.String PARAMETER_TOURNAMENT_SIZE
          The parameter name for "The fraction of the current population which should be used as tournament members (only tournament selection).
static java.lang.String PARAMETER_USE_DIFF
           
static java.lang.String PARAMETER_USE_DIV
           
static java.lang.String PARAMETER_USE_EARLY_STOPPING
           
static java.lang.String PARAMETER_USE_MULT
           
static java.lang.String PARAMETER_USE_PLUS
           
static int RANK_SELECTION
           
static int ROULETTE_WHEEL
           
static java.lang.String[] SELECTION_SCHEMES
           
static int STOCHASTIC_UNIVERSAL
           
static int TOURNAMENT_SELECTION
           
static int UNIFORM_SELECTION
           
 
Fields inherited from class com.rapidminer.operator.features.construction.ExampleSetBasedFeatureOperator
PARAMETER_MAXIMAL_FITNESS, PARAMETER_SHOW_STOP_DIALOG
 
Constructor Summary
AbstractGeneratingGeneticAlgorithm(OperatorDescription description)
           
 
Method Summary
 ExampleSetBasedPopulation createInitialPopulation(ExampleSet es)
          Sets up a population of given size and creates ExampleSets with randomly selected attributes (the probability to be switched on is controlled by pInitialize).
protected  ExampleSetBasedPopulationOperator getCrossoverPopulationOperator(ExampleSet exampleSet)
          Returns an UnbalancedCrossover.
protected abstract  ExampleSetBasedPopulationOperator getGeneratingPopulationOperator(ExampleSet exampleSet)
          Returns a specialized generating mutation, e.g. a AttributeGenerator.
 java.util.List<FeatureGenerator> getGenerators()
          Returns a list with all generator which should be used.
protected abstract  ExampleSetBasedPopulationOperator getMutationPopulationOperator(ExampleSet example)
          Returns an operator that performs the mutation.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 java.util.List<ExampleSetBasedPopulationOperator> getPostEvaluationPopulationOperators(ExampleSet input)
          Returns the list with post eval pop ops.
protected  java.util.List<ExampleSetBasedPopulationOperator> getPostProcessingPopulationOperators(ExampleSet input)
          Returns an empty list.
 java.util.List<ExampleSetBasedPopulationOperator> getPreEvaluationPopulationOperators(ExampleSet input)
          Returns the list with pre eval pop ops.
protected  java.util.List<ExampleSetBasedPopulationOperator> getPreProcessingPopulationOperators(ExampleSet exampleSet)
           
 boolean solutionGoodEnough(ExampleSetBasedPopulation pop)
          Returns true if generation is >= maximum_number_of_generations or after generations_without_improval generations without improval.
 
Methods inherited from class com.rapidminer.operator.features.construction.ExampleSetBasedFeatureOperator
doWork, evaluate, evaluate, getCheckForMaximum, getPopulation, getRandom, setCheckForMaximum
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addOperator, addOperator, addSubprocess, areSubprocessesExtendable, assumePreconditionsSatisfied, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clear, cloneOperator, collectErrors, createProcessTree, createSubprocess, freeMemory, getAllInnerOperators, getAllInnerOperatorsAndMe, getImmediateChildren, getIndexOfOperator, getInnerOperatorCondition, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getNumberOfAllOperators, getNumberOfOperators, getNumberOfSubprocesses, getOperator, getOperatorFromAll, getOperators, getSubprocess, getSubprocesses, isEnabled, lookupOperator, notifyRenaming, performAdditionalChecks, processFinished, processStarts, propagateDirtyness, registerOperator, removeOperator, removeSubprocess, shouldAddNonConsumedInput, shouldReturnInnerOutput, unregisterOperator, updateExecutionOrder, walk
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, checkAll, checkAllExcludingMetaData, checkForStop, clearErrorList, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getResourceConsumptionEstimator, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, makeDirty, makeDirtyOnUpdate, preAutoWire, producesOutput, register, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SELECTION_SCHEMES

public static final java.lang.String[] SELECTION_SCHEMES

UNIFORM_SELECTION

public static final int UNIFORM_SELECTION
See Also:
Constant Field Values

CUT_SELECTION

public static final int CUT_SELECTION
See Also:
Constant Field Values

ROULETTE_WHEEL

public static final int ROULETTE_WHEEL
See Also:
Constant Field Values

STOCHASTIC_UNIVERSAL

public static final int STOCHASTIC_UNIVERSAL
See Also:
Constant Field Values

BOLTZMANN_SELECTION

public static final int BOLTZMANN_SELECTION
See Also:
Constant Field Values

RANK_SELECTION

public static final int RANK_SELECTION
See Also:
Constant Field Values

TOURNAMENT_SELECTION

public static final int TOURNAMENT_SELECTION
See Also:
Constant Field Values

NON_DOMINATED_SORTING_SELECTION

public static final int NON_DOMINATED_SORTING_SELECTION
See Also:
Constant Field Values

PARAMETER_POPULATION_SIZE

public static final java.lang.String PARAMETER_POPULATION_SIZE
The parameter name for "Number of individuals per generation."

See Also:
Constant Field Values

PARAMETER_MAXIMUM_NUMBER_OF_GENERATIONS

public static final java.lang.String PARAMETER_MAXIMUM_NUMBER_OF_GENERATIONS
The parameter name for "Number of generations after which to terminate the algorithm."

See Also:
Constant Field Values

PARAMETER_USE_EARLY_STOPPING

public static final java.lang.String PARAMETER_USE_EARLY_STOPPING
See Also:
Constant Field Values

PARAMETER_GENERATIONS_WITHOUT_IMPROVAL

public static final java.lang.String PARAMETER_GENERATIONS_WITHOUT_IMPROVAL
The parameter name for "Stop criterion: Stop after n generations without improval of the performance (-1: perform all generations)."

See Also:
Constant Field Values

PARAMETER_TOURNAMENT_SIZE

public static final java.lang.String PARAMETER_TOURNAMENT_SIZE
The parameter name for "The fraction of the current population which should be used as tournament members (only tournament selection)."

See Also:
Constant Field Values

PARAMETER_START_TEMPERATURE

public static final java.lang.String PARAMETER_START_TEMPERATURE
The parameter name for "The scaling temperature (only Boltzmann selection)."

See Also:
Constant Field Values

PARAMETER_DYNAMIC_SELECTION_PRESSURE

public static final java.lang.String PARAMETER_DYNAMIC_SELECTION_PRESSURE
The parameter name for "If set to true the selection pressure is increased to maximum during the complete optimization run (only Boltzmann and tournament selection)."

See Also:
Constant Field Values

PARAMETER_KEEP_BEST_INDIVIDUAL

public static final java.lang.String PARAMETER_KEEP_BEST_INDIVIDUAL
The parameter name for "If set to true, the best individual of each generations is guaranteed to be selected for the next generation (elitist selection)."

See Also:
Constant Field Values

PARAMETER_P_INITIALIZE

public static final java.lang.String PARAMETER_P_INITIALIZE
See Also:
Constant Field Values

PARAMETER_P_CROSSOVER

public static final java.lang.String PARAMETER_P_CROSSOVER
See Also:
Constant Field Values

PARAMETER_CROSSOVER_TYPE

public static final java.lang.String PARAMETER_CROSSOVER_TYPE
See Also:
Constant Field Values

PARAMETER_USE_PLUS

public static final java.lang.String PARAMETER_USE_PLUS
See Also:
Constant Field Values

PARAMETER_USE_DIFF

public static final java.lang.String PARAMETER_USE_DIFF
See Also:
Constant Field Values

PARAMETER_USE_MULT

public static final java.lang.String PARAMETER_USE_MULT
See Also:
Constant Field Values

PARAMETER_USE_DIV

public static final java.lang.String PARAMETER_USE_DIV
See Also:
Constant Field Values

PARAMETER_RECIPROCAL_VALUE

public static final java.lang.String PARAMETER_RECIPROCAL_VALUE
See Also:
Constant Field Values
Constructor Detail

AbstractGeneratingGeneticAlgorithm

public AbstractGeneratingGeneticAlgorithm(OperatorDescription description)
Method Detail

getGeneratingPopulationOperator

protected abstract ExampleSetBasedPopulationOperator getGeneratingPopulationOperator(ExampleSet exampleSet)
                                                                              throws OperatorException
Returns a specialized generating mutation, e.g. a AttributeGenerator.

Throws:
OperatorException

getMutationPopulationOperator

protected abstract ExampleSetBasedPopulationOperator getMutationPopulationOperator(ExampleSet example)
                                                                            throws OperatorException
Returns an operator that performs the mutation. Can be overridden by subclasses.

Throws:
OperatorException

getPostProcessingPopulationOperators

protected java.util.List<ExampleSetBasedPopulationOperator> getPostProcessingPopulationOperators(ExampleSet input)
                                                                                          throws OperatorException
Returns an empty list.

Throws:
OperatorException

getPreEvaluationPopulationOperators

public final java.util.List<ExampleSetBasedPopulationOperator> getPreEvaluationPopulationOperators(ExampleSet input)
                                                                                            throws OperatorException
Returns the list with pre eval pop ops.

Specified by:
getPreEvaluationPopulationOperators in class ExampleSetBasedFeatureOperator
Throws:
OperatorException

getPostEvaluationPopulationOperators

public final java.util.List<ExampleSetBasedPopulationOperator> getPostEvaluationPopulationOperators(ExampleSet input)
                                                                                             throws OperatorException
Returns the list with post eval pop ops.

Specified by:
getPostEvaluationPopulationOperators in class ExampleSetBasedFeatureOperator
Throws:
OperatorException

solutionGoodEnough

public boolean solutionGoodEnough(ExampleSetBasedPopulation pop)
Returns true if generation is >= maximum_number_of_generations or after generations_without_improval generations without improval.

Specified by:
solutionGoodEnough in class ExampleSetBasedFeatureOperator

createInitialPopulation

public ExampleSetBasedPopulation createInitialPopulation(ExampleSet es)
                                                  throws UndefinedParameterError
Sets up a population of given size and creates ExampleSets with randomly selected attributes (the probability to be switched on is controlled by pInitialize).

Specified by:
createInitialPopulation in class ExampleSetBasedFeatureOperator
Throws:
UndefinedParameterError

getPreProcessingPopulationOperators

protected java.util.List<ExampleSetBasedPopulationOperator> getPreProcessingPopulationOperators(ExampleSet exampleSet)
                                                                                         throws OperatorException
Throws:
OperatorException

getCrossoverPopulationOperator

protected ExampleSetBasedPopulationOperator getCrossoverPopulationOperator(ExampleSet exampleSet)
                                                                    throws UndefinedParameterError
Returns an UnbalancedCrossover.

Throws:
UndefinedParameterError

getGenerators

public java.util.List<FeatureGenerator> getGenerators()
Returns a list with all generator which should be used.


getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Description copied from class: Operator
Returns a list of ParameterTypes describing the parameters of this operator. The default implementation returns an empty list if no input objects can be retained and special parameters for those input objects which can be prevented from being consumed. ATTENTION! This will create new parameterTypes. For calling already existing parameter types use getParameters().getParameterTypes();

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class ExampleSetBasedFeatureOperator


Copyright © 2001-2009 by Rapid-I