You are viewing the RapidMiner Studio documentation for version 9.5 - Check here for latest version
Optimize Selection (Evolutionary) (RapidMiner Studio Core)
SynopsisThis operator selects the most relevant attributes of the given ExampleSet. A Genetic Algorithm is used for feature selection.
Feature selection i.e. the question for the most relevant features for classification or regression problems, is one of the main data mining tasks. A wide range of search methods have been integrated into RapidMiner including evolutionary algorithms. For all search methods we need a performance measurement which indicates how well a search point (a feature subset) will probably perform on the given data set.
A genetic algorithm (GA) is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization and search problems. Genetic algorithms belong to the larger class of evolutionary algorithms (EA), which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover.
In genetic algorithm for feature selection 'mutation' means switching features on and off and 'crossover' means interchanging used features. Selection is done by the specified selection scheme which is selected by the selection scheme parameter. A genetic algorithm works as follows:
Generate an initial population consisting of p individuals. Each attribute is switched on with probability p_i. The numbers p and p_i can be adjusted by the population size and p initialize parameters respectively.
For all individuals in the population Perform mutation, i.e. set used attributes to unused with probability p_m and vice versa. The probability p_m can be adjusted by the p mutation parameter. Choose two individuals from the population and perform crossover with probability p_c. The probability p_c can be adjusted by the p crossover parameter. The type of crossover can be selected by the crossover type parameter. Perform selection, map all individuals according to their fitness and draw p individuals at random according to their probability where p is the population size which can be adjusted by the population size parameter. As long as the fitness improves, go to step number 2.
If the ExampleSet contains value series attributes with block numbers, the whole block will be switched on and off. Exact, minimum or maximum number of attributes in combinations to be tested can be specified by the appropriate parameters. Many other options are also available for this operator. Please study the parameters section for more information.
- example set in (IOObject)
This input port expects an ExampleSet. This ExampleSet is available at the first port of the nested chain (inside the subprocess) for processing in the subprocess.
- attribute weights in (Average Vector)
This port expects attribute weights. It is not compulsory to use this port.
- through (IOObject)
This operator can have multiple through ports. When one input is connected with the through port, another through port becomes available which is ready to accept another input (if any). The order of inputs remains the same. The Object supplied at the first through port of this operator is available at the first through port of the nested chain (inside the subprocess). Do not forget to connect all inputs in correct order. Make sure that you have connected right number of ports at subprocess level.
- example set out (IOObject)
The genetic algorithm is applied on the input ExampleSet. The resultant ExampleSet with reduced attributes is delivered through this port.
- weights (Average Vector)
The attribute weights are delivered through this port.
- performance (Performance Vector)
This port delivers the Performance Vector for the selected attributes. A Performance Vector is a list of performance criteria values.
- use_exact_number_of_attributesThis parameter determines if only combinations containing exact numbers of attributes should be tested. The exact number is specified by the exact number of attributes parameter. Range: boolean
- exact_number_of_attributesThis parameter is only available when the use exact number of attributes parameter is set to true. Only combinations containing this numbers of attributes would be generated and tested. Range: integer
- restrict_maximumIf set to true, the maximum number of attributes whose combinations will be generated and tested can be restricted. Otherwise all combinations of all attributes are generated and tested. This parameter is only available when the use exact number of attributes parameter is set to true. Range: boolean
- min_of_attributesThis parameter determines the minimum number of features used for the combinations to be generated and tested. Range: integer
- max_number_of_attributesThis parameter determines the maximum number of features used for the combinations to be generated and tested. This parameter is only available when the restrict maximum parameter is set to true. Range: integer
- population_sizeThis parameter specifies the population size i.e. the number of individuals per generation. Range: integer
- maximum_number_of_generationsThis parameter specifies the number of generations after which the algorithm should be terminated. Range: integer
- use_early_stoppingThis parameter enables early stopping. If not set to true, always the maximum number of generations are performed. Range: boolean
- generations_without_improvalThis parameter is only available when the use early stopping parameter is set to true. This parameter specifies the stop criterion for early stopping i.e. it stops after n generations without improvement in the performance. n is specified by this parameter. Range: integer
- normalize_weightsThis parameter indicates if the final weights should be normalized. If set to true, the final weights are normalized such that the maximum weight is 1 and the minimum weight is 0. Range: boolean
- use_local_random_seedThis parameter indicates if a local random seed should be used for randomization. Using the same value of local random seed will produce the same randomization. Range: boolean
- local_random_seedThis parameter specifies the local random seed. This parameter is only available if the use local random seed parameter is set to true. Range: integer
- show_stop_dialogThis parameter determines if a dialog with a stop button should be displayed which stops the search for the best feature space. If the search for best feature space is stopped, the best individual found till then will be returned. Range: boolean
- user_result_individual_selectionIf this parameter is set to true, it allows the user to select the final result individual from the last population. Range: boolean
- show_population_plotterThis parameter determines if the current population should be displayed in performance space. Range: boolean
- plot_generationsThis parameter is only available when the show population plotter parameter is set to true. The population plotter is updated in these generations. Range: integer
- constraint_draw_rangeThis parameter is only available when the show population plotter parameter is set to true. This parameter determines if the draw range of the population plotter should be constrained between 0 and 1. Range: boolean
- draw_dominated_pointsThis parameter is only available when the show population plotter parameter is set to true. This parameter determines if only points which are not Pareto dominated should be drawn on the population plotter. Range: boolean
- population_criteria_data_fileThis parameter specifies the path to the file in which the criteria data of the final population should be saved. Range: filename
- maximal_fitnessThis parameter specifies the maximal fitness. The optimization will stop if the fitness reaches this value. Range: real
- selection_schemeThis parameter specifies the selection scheme of this evolutionary algorithms. Range: selection
- tournament_sizeThis parameter is only available when the selection scheme parameter is set to 'tournament'. It specifies the fraction of the current population which should be used as tournament members. Range: real
- start_temperatureThis parameter is only available when the selection scheme parameter is set to 'Boltzmann'. It specifies the scaling temperature. Range: real
- dynamic_selection_pressureThis parameter is only available when the selection scheme parameter is set to 'Boltzmann' or 'tournament'. If set to true the selection pressure is increased to maximum during the complete optimization run. Range: boolean
- keep_best_individual If set to true, the best individual of each generations is guaranteed to be selected for the next generation. Range: boolean
- save_intermediate_weightsThis parameter determines if the intermediate best results should be saved. Range: boolean
- intermediate_weights_generationsThis parameter is only available when the save intermediate weights parameter is set to true. The intermediate best results would be saved every k generations where k is specified by this parameter. Range: integer
- intermediate_weights_fileThis parameter specifies the file into which the intermediate weights should be saved. Range: filename
- p_initializeThe initial probability for an attribute to be switched on is specified by this parameter. Range: real
- p_mutationThe probability for an attribute to be changed is specified by this parameter. If set to -1, the probability will be set to 1/n where n is the total number of attributes. Range: real
- p_crossoverThe probability for an individual to be selected for crossover is specified by this parameter. Range: real
- crossover_typeThe type of the crossover can be selected by this parameter. Range: selection
Feature reduction of the Polynomial data set
The 'Polynomial' data set is loaded using the Retrieve operator. A breakpoint is inserted here so that you can have a look at the ExampleSet. You can see that the ExampleSet has 5 regular attributes other then the label attribute. The Optimize Selection (Evolutionary) operator is applied on the ExampleSet it is a nested operator i.e. it has a subprocess. It is necessary for the subprocess to deliver a performance vector. This performance vector is used by the underlying Genetic Algorithm. Have a look at the subprocess of this operator. The Split Validation operator has been used there which itself is a nested operator. Have a look at the subprocesses of the Split Validation operator. The SVM operator is used in the 'Training' subprocess to train a model. The trained model is applied using the Apply Model operator in the 'Testing' subprocess. The performance is measured through the Performance operator and the resultant performance vector is used by the underlying algorithm. Run the process and switch to the Results Workspace. You can see that the ExampleSet that had 5 attributes has now been reduced to 3 attributes.