|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.Operator
com.rapidminer.operator.OperatorChain
com.rapidminer.operator.features.FeatureOperator
com.rapidminer.operator.features.selection.FeatureSelectionOperator
public class FeatureSelectionOperator
This operator realizes the two deterministic greedy feature selection algorithms forward selection and backward elimination. However, we added some enhancements to the standard algorithms which are described below:
The parameter k can be specified by the parameter
keep_best, the parameter p can be specified by
the parameter generations_without_improval. These parameters
have default values 1 which means that the standard selection algorithms are
used. Using other values increase the runtime but might help to avoid local
extrema in the search for the global optimum.
Another unusual parameter is maximum_number_of_generations.
This parameter bounds the number of iterations to this maximum of feature
selections / deselections. In combination with
generations_without_improval this allows several different
selection schemes (which are described for forward selection, backward
elimination works analogous):
maximum_number_of_generations = m and
generations_without_improval = p: Selects
maximal m features. The selection stops if not performance
improvement was measured in the last p generations.maximum_number_of_generations = -1 and
generations_without_improval = p: Tries to
selects new features until no performance improvement was measured in the
last p generations.maximum_number_of_generations = m and
generations_without_improval = -1: Selects
maximal m features. The selection stops is not stopped until all
combinations with maximal m were tried. However, the result
might contain less features than these.maximum_number_of_generations = -1 and
generations_without_improval = -1: Test all
combinations of attributes (brute force, this might take a very long time and
should only be applied to small attribute sets).
| Field Summary | |
|---|---|
static int |
BACKWARD_ELIMINATION
|
static int |
FORWARD_SELECTION
|
static java.lang.String |
PARAMETER_GENERATIONS_WITHOUT_IMPROVAL
The parameter name for "Stop after n generations without improval of the performance (-1: stops if the maximum_number_of_generations is reached). |
static java.lang.String |
PARAMETER_KEEP_BEST
The parameter name for "Keep the best n individuals in each generation. |
static java.lang.String |
PARAMETER_MAXIMUM_NUMBER_OF_GENERATIONS
The parameter name for "Delivers the maximum amount of generations (-1: might use or deselect all features). |
static java.lang.String |
PARAMETER_SELECTION_DIRECTION
The parameter name for "Forward selection or backward elimination. |
| Constructor Summary | |
|---|---|
FeatureSelectionOperator(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
IOObject[] |
apply()
Applies the feature operator: collects the pre- and postevaluation operators create an initial population evaluate the initial population loop as long as solution is not good enough apply all pre evaluation operators evaluate the population update the population's best individual apply all post evaluation operators return all generation's best individual |
Population |
createInitialPopulation(ExampleSet es)
May es have n features. |
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of this operator. |
java.util.List<PopulationOperator> |
getPostEvaluationPopulationOperators(ExampleSet input)
empty list |
java.util.List<PopulationOperator> |
getPreEvaluationPopulationOperators(ExampleSet input)
The operators performs two steps: forward selection/backward elimination kick out all but the keep_best individuals remove redundant individuals |
boolean |
solutionGoodEnough(Population pop)
Returns true if the best individual is not better than the last generation's best individual. |
| Methods inherited from class com.rapidminer.operator.features.FeatureOperator |
|---|
createCleanClone, evaluate, getCheckForMaximum, getInnerOperatorCondition, getInputClasses, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getOutputClasses, getPopulation, getPopulationEvaluator, getRandom, setCheckForMaximum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAMETER_SELECTION_DIRECTION
public static final java.lang.String PARAMETER_KEEP_BEST
public static final java.lang.String PARAMETER_GENERATIONS_WITHOUT_IMPROVAL
public static final java.lang.String PARAMETER_MAXIMUM_NUMBER_OF_GENERATIONS
public static final int FORWARD_SELECTION
public static final int BACKWARD_ELIMINATION
| Constructor Detail |
|---|
public FeatureSelectionOperator(OperatorDescription description)
| Method Detail |
|---|
public IOObject[] apply()
throws OperatorException
FeatureOperator
apply in class FeatureOperatorOperatorException
public Population createInitialPopulation(ExampleSet es)
throws UndefinedParameterError
createInitialPopulation in class FeatureOperatorUndefinedParameterError
public java.util.List<PopulationOperator> getPreEvaluationPopulationOperators(ExampleSet input)
throws OperatorException
getPreEvaluationPopulationOperators in class FeatureOperatorOperatorException
public java.util.List<PopulationOperator> getPostEvaluationPopulationOperators(ExampleSet input)
throws OperatorException
getPostEvaluationPopulationOperators in class FeatureOperatorOperatorException
public boolean solutionGoodEnough(Population pop)
throws OperatorException
solutionGoodEnough in class FeatureOperatorOperatorExceptionpublic java.util.List<ParameterType> getParameterTypes()
Operator
getParameterTypes in interface ParameterHandlergetParameterTypes in class FeatureOperator
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||