com.rapidminer.operator.meta
Class GridSearchParameterOptimizationOperator

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.OperatorChain
              extended by com.rapidminer.operator.meta.ParameterIteratingOperatorChain
                  extended by com.rapidminer.operator.meta.ParameterOptimizationOperator
                      extended by com.rapidminer.operator.meta.GridSearchParameterOptimizationOperator
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>
Direct Known Subclasses:
QuadraticParameterOptimizationOperator

public class GridSearchParameterOptimizationOperator
extends ParameterOptimizationOperator

This operator finds the optimal values for a set of parameters using a grid search. The parameter parameters is a list of key value pairs where the keys are of the form operator_name.parameter_name and the value is either a comma separated list of values (e.g. 10,15,20,25) or an interval definition in the format [start;end;stepsize] (e.g. [10;25;5]). Alternatively a value grid pattern may be used by [e.g. [start;end;no_steps;scale], where scale identifies the type of the pattern.

The operator returns an optimal ParameterSet which can as well be written to a file with a ParameterSetWriter. This parameter set can be read in another process using a ParameterSetLoader.

The file format of the parameter set file is straightforward and can easily be generated by external applications. Each line is of the form

operator_name.parameter_name = value

Please refer to section Advanced Processes/Parameter and performance analysis for an example application. Another parameter optimization schems like the EvolutionaryParameterOptimizationOperator might also be useful if the best ranges and dependencies are not known at all. Another operator which works similar to this parameter optimization operator is the operator ParameterIteration. In contrast to the optimization operator, this operator simply iterates through all parameter combinations. This might be especially useful for plotting purposes.

Author:
Simon Fischer, Helge Homburg, Ingo Mierswa, Tobias Malbrecht 15:35:49 ingomierswa Exp $

Field Summary
protected  int[] currentIndex
           
protected  int numberOfCombinations
           
protected  int numberOfParameters
           
protected  Operator[] operators
           
protected  java.lang.String[] parameters
           
protected  java.lang.String[][] values
           
 
Fields inherited from class com.rapidminer.operator.meta.ParameterIteratingOperatorChain
PARAMETER_PARAMETERS, PARAMETER_VALUES, VALUE_MODE_CONTINUOUS, VALUE_MODE_DISCRETE
 
Constructor Summary
GridSearchParameterOptimizationOperator(OperatorDescription description)
           
 
Method Summary
protected  PerformanceVector computeCurrentPerformeance()
          Computes the performance for the current parameter values.
 void doWork()
          Performs the actual work of the operator and must be implemented by subclasses.
 double getCurrentBestPerformance()
           
protected  void getParametersToOptimize()
           
 int getParameterValueMode()
          Has to return one of the predefined modes which indicate whether the operator takes discrete values or intervals as basis for optimization.
 
Methods inherited from class com.rapidminer.operator.meta.ParameterOptimizationOperator
deliver, getPerformance, isPerformanceRequired, makeInnerSinkExtender
 
Methods inherited from class com.rapidminer.operator.meta.ParameterIteratingOperatorChain
checkProperties, executeSubprocess, getInnerResults, getInnerSinkExtender, getParameterTypes, getPerformance, getPerformance, getPerformanceInnerSink, parseParameterValues, passResultsThrough
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addOperator, addOperator, addSubprocess, areSubprocessesExtendable, assumePreconditionsSatisfied, checkDeprecations, checkIO, checkNumberOfInnerOperators, clear, clearAllInnerSinks, cloneOperator, collectErrors, createProcessTree, createSubprocess, freeMemory, getAllInnerOperators, getAllInnerOperatorsAndMe, getImmediateChildren, getIndexOfOperator, getInnerOperatorCondition, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getNumberOfAllOperators, getNumberOfOperators, getNumberOfSubprocesses, getOperator, getOperatorFromAll, getOperators, getSubprocess, getSubprocesses, isEnabled, lookupOperator, notifyRenaming, performAdditionalChecks, processFinished, processStarts, propagateDirtyness, registerOperator, removeOperator, removeSubprocess, shouldAddNonConsumedInput, shouldReturnInnerOutput, unregisterOperator, updateExecutionOrder, walk
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, checkAll, checkAllExcludingMetaData, checkForStop, clearErrorList, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getResourceConsumptionEstimator, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, makeDirty, makeDirtyOnUpdate, preAutoWire, producesOutput, register, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

operators

protected Operator[] operators

parameters

protected java.lang.String[] parameters

values

protected java.lang.String[][] values

currentIndex

protected int[] currentIndex

numberOfCombinations

protected int numberOfCombinations

numberOfParameters

protected int numberOfParameters
Constructor Detail

GridSearchParameterOptimizationOperator

public GridSearchParameterOptimizationOperator(OperatorDescription description)
Method Detail

getParameterValueMode

public int getParameterValueMode()
Description copied from class: ParameterIteratingOperatorChain
Has to return one of the predefined modes which indicate whether the operator takes discrete values or intervals as basis for optimization. The first option is to be taken for all strategies that iterate over the given parameters. The latter option is to be taken for strategies such as an evolutionary one in which allowed ranges of parameters have to be specified.

Specified by:
getParameterValueMode in class ParameterIteratingOperatorChain

computeCurrentPerformeance

protected PerformanceVector computeCurrentPerformeance()
Computes the performance for the current parameter values.


getParametersToOptimize

protected void getParametersToOptimize()
                                throws OperatorException
Throws:
OperatorException

getCurrentBestPerformance

public double getCurrentBestPerformance()
Specified by:
getCurrentBestPerformance in class ParameterOptimizationOperator

doWork

public void doWork()
            throws OperatorException
Description copied from class: Operator
Performs the actual work of the operator and must be implemented by subclasses. Replaces the old method apply().

Overrides:
doWork in class OperatorChain
Throws:
OperatorException


Copyright © 2001-2009 by Rapid-I