Package adams.opt.optimise
Class RandomOptimiser
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.opt.optimise.AbstractOptimiser
-
- adams.opt.optimise.RandomOptimiser
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,Randomizable,SizeOfHandler,Serializable,Comparable
public class RandomOptimiser extends AbstractOptimiser implements Randomizable
Generate random parameter values.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-iterations <int> (property: iterations) The number of iterations to use. default: 1000
-seed <long> (property: seed) The seed value for the random number generator. default: 1
- Version:
- $Revision$
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_Iterationsnumber of iterations.protected longm_Seedthe seed value.-
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 RandomOptimiser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.intgetIterations()Gets the iterations use.longgetSeed()Returns the seed value.StringglobalInfo()Returns a string describing the object.StringiterationsTipText()Returns the tip text for this property.OptDataoptimise(OptData datadef, FitnessFunction fitness)Do the optimisation.StringseedTipText()Returns the tip text for this property.voidsetIterations(int value)Sets the iterations to use.voidsetSeed(long value)Sets the seed value.-
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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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.
-
setSeed
public void setSeed(long value)
Sets the seed value.- Specified by:
setSeedin interfaceRandomizable- Parameters:
value- the seed
-
getSeed
public long getSeed()
Returns the seed value.- Specified by:
getSeedin interfaceRandomizable- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipTextin interfaceRandomizable- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
optimise
public OptData optimise(OptData datadef, FitnessFunction fitness)
Do the optimisation.- Specified by:
optimisein classAbstractOptimiser- Parameters:
datadef- data initialisations.fitness- fitness function.- Returns:
- best vars
-
-