edu.udo.cs.yale.operator.features.construction
Class UnbalancedCrossover
java.lang.Object
edu.udo.cs.yale.operator.features.selection.SelectionCrossover
edu.udo.cs.yale.operator.features.construction.UnbalancedCrossover
- All Implemented Interfaces:
- PopulationOperator
public class UnbalancedCrossover
- extends SelectionCrossover
This PopulationOperator applies a crossover on two example sets.
Crossover type can be ONE_POINT, UNIFORM, or SHUFFLE. In difference to
SelectionCrossover the attribute vectors can have different lengths.
This crossover type should only be used for SINGLE_VALUEs, i.e. attributes
without a block number (blocknumber can and should be assigned to value
series attributes)!
- Version:
- $Id: UnbalancedCrossover.java,v 1.1 2006/04/14 07:47:17 ingomierswa
Exp $
- Author:
- Ingo Mierswa
Field Summary |
private java.util.Random |
random
|
Constructor Summary |
UnbalancedCrossover(int type,
double prob,
java.util.Random random)
Creates a new generating crossover with the given type which will be
applied with the given probability. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
private java.util.Random random
UnbalancedCrossover
public UnbalancedCrossover(int type,
double prob,
java.util.Random random)
- Creates a new generating crossover with the given type which will be
applied with the given probability.
crossover
public void crossover(AttributeWeightedExampleSet es1,
AttributeWeightedExampleSet es2)
- Applies the crossover. Works directly on the given example sets.
- Overrides:
crossover
in class SelectionCrossover
addAttributeToSwapList
private void addAttributeToSwapList(AttributeWeightedExampleSet exampleSet,
int index,
java.util.List<UnbalancedCrossover.AttributeWeightContainer> dummyList)
mergeAttributes
private void mergeAttributes(AttributeWeightedExampleSet exampleSet,
java.util.List<UnbalancedCrossover.AttributeWeightContainer> attributeWeights)
Copyright © 2001-2006