Package adams.opt.optimise
Class GridSearch
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
,Comparable
public class GridSearch extends AbstractOptimiser
Grid Search searches the parameter hyper-grid space. The search is refineable.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-iterations <int> (property: iterations) The number of iterations to use. default: 1000
-grids <int> (property: grids) The number of grids to use. default: 3
- Version:
- $Revision$
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Iterations
number of iterations.-
Fields inherited from class adams.opt.optimise.AbstractOptimiser
m_bestf, m_bestv
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description GridSearch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.OptData
doGrid(OptData datadef, FitnessFunction fitness)
Calc for this grid.int
getIterations()
Gets the iterations use.String
globalInfo()
Returns a string describing the object.String
iterationsTipText()
Returns the tip text for this property.OptData
optimise(OptData datadef, FitnessFunction fitness)
Do grid Optimisation.void
setIterations(int value)
Sets the iterations to use.protected void
setMax(OptData datadef)
Initialise vars to their maximum.protected void
setMin(OptData datadef)
Initialise vars to their minimum.protected void
setStepSizes(OptData datadef, Hashtable<String,Double> stepsize)
set Set sizes for params.-
Methods inherited from class adams.opt.optimise.AbstractOptimiser
checkBest, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getOptimisers, initialize, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setIterations
public void setIterations(int value)
Sets the iterations to use.- Parameters:
value
- the iterations.
-
getIterations
public int getIterations()
Gets the iterations use.- Returns:
- the iterations
-
iterationsTipText
public String iterationsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMin
protected void setMin(OptData datadef)
Initialise vars to their minimum.- Parameters:
datadef
- vars
-
setMax
protected void setMax(OptData datadef)
Initialise vars to their maximum.- Parameters:
datadef
- vars
-
doGrid
public OptData doGrid(OptData datadef, FitnessFunction fitness)
Calc for this grid.- Parameters:
datadef
- varsfitness
- fitness fn- Returns:
- best
-
optimise
public OptData optimise(OptData datadef, FitnessFunction fitness)
Do grid Optimisation.- Specified by:
optimise
in classAbstractOptimiser
- Parameters:
datadef
- the varsfitness
- fitness function- Returns:
- best vars
-
-