edu.udo.cs.yale.operator.features.selection
Class WeightGuidedSelectionOperator

java.lang.Object
  extended by edu.udo.cs.yale.operator.Operator
      extended by edu.udo.cs.yale.operator.OperatorChain
          extended by edu.udo.cs.yale.operator.features.FeatureOperator
              extended by edu.udo.cs.yale.operator.features.selection.WeightGuidedSelectionOperator
All Implemented Interfaces:
ConfigurationListener

public class WeightGuidedSelectionOperator
extends FeatureOperator

This operator uses input attribute weights to determine the order of features added to the feature set starting with the feature set containing only the feature with highest weight. The inner operators must provide a performance vector to determine the fitness of the current feature set, e.g. a cross validation of a learning scheme for a wrapper evaluation. Stops if adding the last k features does not increase the performance or if all features were added. The value of k can be set with the parameter generations_without_improval.

Version:
$Id: WeightGuidedSelectionOperator.java,v 1.1 2006/04/14 11:42:27 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  java.lang.String[] attributeNames
          A descending sorted array of all attribute names.
private  int generationsWOImp
           
private  int maxGenerations
           
 
Constructor Summary
WeightGuidedSelectionOperator(OperatorDescription description)
           
 
Method Summary
 Population createInitialPopulation(ExampleSet es)
          Returns an example set containing only the feature with the biggest weight.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 java.util.List<PopulationOperator> getPostEvaluationPopulationOperators(ExampleSet input)
          Returns an empty list.
 java.util.List<PopulationOperator> getPreEvaluationPopulationOperators(ExampleSet input)
          The operators add the feature with the next highest weight.
 boolean solutionGoodEnough(Population pop)
          Returns true if the best individual is not better than the last generation's best individual.
 
Methods inherited from class edu.udo.cs.yale.operator.features.FeatureOperator
apply, evaluate, evaluate, getCheckForMaximum, getInnerOperatorCondition, getInputClasses, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getNumberOfSteps, getOutputClasses, getRandom, setCheckForMaximum
 
Methods inherited from class edu.udo.cs.yale.operator.OperatorChain
addAddListener, addOperator, addOperator, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clearErrorList, clearStepCounter, cloneOperator, countStep, createExperimentTree, delete, experimentFinished, experimentStarts, getAllInnerOperators, getCurrentStep, getIndexOfOperator, getInnerOperatorForName, getInnerOperatorsXML, getNumberOfAllOperators, getNumberOfChildrensSteps, getNumberOfOperators, getOperator, getOperatorFromAll, getOperators, isEnabled, performAdditionalChecks, removeAddListener, removeOperator, setEnabled, setExperiment, shouldReturnInnerOutput
 
Methods inherited from class edu.udo.cs.yale.operator.Operator
addError, addValue, addWarning, apply, createExperimentTree, createFromXML, createMarkedExperimentTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getErrorList, getExperiment, getInput, getInput, getInput, getInputDescription, getIOContainerForInApplyLoopBreakpoint, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsInt, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isParameterSet, logMessage, register, remove, rename, resume, setBreakpoint, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

generationsWOImp

private int generationsWOImp

maxGenerations

private int maxGenerations

attributeNames

private java.lang.String[] attributeNames
A descending sorted array of all attribute names.

Constructor Detail

WeightGuidedSelectionOperator

public WeightGuidedSelectionOperator(OperatorDescription description)
Method Detail

createInitialPopulation

public Population createInitialPopulation(ExampleSet es)
                                   throws UndefinedParameterError
Returns an example set containing only the feature with the biggest weight.

Specified by:
createInitialPopulation in class FeatureOperator
Throws:
UndefinedParameterError


getPreEvaluationPopulationOperators

public java.util.List<PopulationOperator> getPreEvaluationPopulationOperators(ExampleSet input)
                                                                       throws OperatorException
The operators add the feature with the next highest weight.

Specified by:
getPreEvaluationPopulationOperators in class FeatureOperator
Throws:
OperatorException


getPostEvaluationPopulationOperators

public java.util.List<PopulationOperator> getPostEvaluationPopulationOperators(ExampleSet input)
                                                                        throws OperatorException
Returns an empty list.

Specified by:
getPostEvaluationPopulationOperators in class FeatureOperator
Throws:
OperatorException


solutionGoodEnough

public boolean solutionGoodEnough(Population pop)
                           throws OperatorException
Returns true if the best individual is not better than the last generation's best individual.

Specified by:
solutionGoodEnough in class FeatureOperator
Throws:
OperatorException


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.

Overrides:
getParameterTypes in class FeatureOperator



Copyright © 2001-2006