Optimize Weights (Forward) (RapidMiner Studio Core)
SynopsisThis operator calculates the relevance of the attributes of the given ExampleSet by calculating the attribute weights. This operator assumes that the attributes are independent and optimizes the weights of the attributes with a linear search.
The Optimize Weights (Forward) operator is a nested operator i.e. it has a subprocess. The subprocess of the Optimize Weights (Forward) operator must always return a performance vector. For more information regarding subprocesses please study the Subprocess operator. The Optimize Weights (Forward) operator calculates the weights of the attributes of the given ExampleSet by using the performance vector returned by the subprocess. The higher the weight of an attribute, the more relevant it is considered.
This operator performs the weighting under the naive assumption that the features are independent from each other. Each attribute is weighted with a linear search. This approach may deliver good results after short time if the features indeed are not highly correlated.
Optimize Weights (Evolutionary)The Optimize Weights (Evolutionary) operator calculates the relevance of the attributes of the given ExampleSet by using an evolutionary approach. The weights of the attributes are calculated using a Genetic Algorithm.
- 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.
- 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 the right number of ports at subprocess level.
- example set out (IOObject)
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.
- keep_bestThis parameter specifies the number of best individuals to keep in each generation. Range: integer
- generations_without_improvalThis 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
- weightsThis parameter specifies the weights to be used for the creation of individuals in each generation. Range: string
- 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 available only 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 the 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 the 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
Calculating the weights of the attributes 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 Weights (Forward) operator is applied on the ExampleSet which 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 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 2 attributes. Also take a look at the weights of the attributes in the Results Workspace. You can see that two attributes have non-zero weight and the remaining attributes have weight 0.