Package adams.opt.genetic
Class AbstractClassifierBasedGeneticAlgorithm
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.opt.genetic.AbstractGeneticAlgorithm
-
- adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithm
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.Pausable
,adams.core.Randomizable
,adams.core.ShallowCopySupporter<adams.opt.genetic.AbstractGeneticAlgorithm>
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.core.ThreadLimiter
,adams.event.GeneticFitnessChangeNotifier
,Serializable
- Direct Known Subclasses:
AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation
public abstract class AbstractClassifierBasedGeneticAlgorithm extends adams.opt.genetic.AbstractGeneticAlgorithm implements adams.event.GeneticFitnessChangeNotifier
Ancestor for genetic algorithms that evaluate classifiers.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob<T extends AbstractClassifierBasedGeneticAlgorithm>
Job class for algorithms with datasets.
-
Field Summary
Fields Modifier and Type Field Description protected int
m_BitsPerGene
the bits per gene to use.protected weka.classifiers.Classifier
m_Classifier
the classifier to use.protected WekaAttributeIndex
m_ClassIndex
the class index.protected WekaLabelIndex
m_ClassLabelIndex
the label index.protected int
m_CrossValidationSeed
the cross-validation seed.protected AbstractWekaEvaluationPostProcessor
m_EvaluationPostProcessor
the postprocessor for the evaluation.protected adams.flow.core.Actor
m_FlowContext
the flow context.protected int
m_Folds
the number of folds for cross-validation.protected CrossValidationFoldGenerator
m_Generator
the fold generator.protected weka.core.Instances
m_Instances
the data to use for cross-validation.protected adams.multiprocess.JobRunner<AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob>
m_JobRunner
the job runner in use.protected adams.flow.standalone.JobRunnerSetup
m_JobRunnerSetup
the jobrunner setup.protected Measure
m_Measure
the measure to use for evaluating the fitness.protected adams.core.io.PlaceholderDirectory
m_OutputDirectory
the directory to store the generated ARFF files in.protected OutputPrefixType
m_OutputPrefixType
the type of prefix to use for the output.protected OutputType
m_OutputType
the type of output to generate.protected adams.opt.genetic.setupupload.AbstractSetupUpload
m_SetupUpload
for uploading the setups.Hashtable<String,Double>
m_StoredResults
the cache for results.protected String
m_SuppliedPrefix
the supplied prefix.protected weka.core.Instances
m_TestInstances
the data to use for evaluation (if null, cross-validation is used).static String
PROPS_FILTER
the key for a filter setup in the setup properties.static String
PROPS_MASK
the key for the mask in the setup properties.static String
PROPS_RELATION
the key for the relation name in the generated properties file.-
Fields inherited from class adams.opt.genetic.AbstractGeneticAlgorithm
m_ActualNumChrom, m_BestFitness, m_BestRange, m_BestSetup, m_BestWeights, m_CurrentIteration, m_FavorZeroes, m_Fitness, m_FitnessChangeListeners, m_FitnessHistory, m_Genes, m_InitialSetupsProvider, m_InitialWeights, m_LastNotificationTime, m_MaxFitnessHistorySize, m_NotificationInterval, m_NumChrom, m_NumGenes, m_NumThreads, m_Paused, m_Random, m_Running, m_Seed, m_Stopped, m_StoppingCriterion
-
-
Constructor Summary
Constructors Constructor Description AbstractClassifierBasedGeneticAlgorithm()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addResult(String key, Double val)
Adds a result to the cache.String
bitsPerGeneTipText()
Returns the tip text for this property.void
calcFitness()
Calculates the fitness of the population.String
classifierTipText()
Returns the tip text for this property.String
classIndexTipText()
Returns the tip text for this property.String
classLabelIndexTipText()
Returns the tip text for this property.protected void
clearResults()
Clears all currently stored results.String
crossValidationSeedTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
evaluationPostProcessorTipText()
Returns the tip text for this property.String
foldsTipText()
Returns the tip text for this property.String
generatorTipText()
Returns the tip text for this property.int
getBitsPerGene()
Returns the currently set number of bits per gene.weka.classifiers.Classifier
getClassifier()
Returns the currently set classifier.WekaAttributeIndex
getClassIndex()
Returns the current class index.WekaLabelIndex
getClassLabelIndex()
Returns the index of the class label to use for statistics that work on a per-label-basis.int
getCrossValidationSeed()
Returns the current seed value for cross-validation.double
getCurrentFitness()
Returns the currently best fitness.protected weka.classifiers.Classifier
getDefaultClassifier()
Returns the default classifier to use.protected abstract OutputType
getDefaultOutputType()
Returns the default output type to use.AbstractWekaEvaluationPostProcessor
getEvaluationPostProcessor()
Returns the post-processing scheme for the evaluation.adams.flow.core.Actor
getFlowContext()
Return the flow context, if any.int
getFolds()
Returns the number of folds to use in cross-validation.CrossValidationFoldGenerator
getGenerator()
Returns the scheme for generating the folds.weka.core.Instances
getInstances()
Returns the currently set dataset for cross-validation.adams.flow.standalone.JobRunnerSetup
getJobRunnerSetup()
Returns the jobrunner setup in use.Measure
getMeasure()
Returns the current measure for evaluating the fitness.adams.core.io.PlaceholderDirectory
getOutputDirectory()
Returns the currently set directory for the generated ARFF files.OutputPrefixType
getOutputPrefixType()
Returns the type of prefix to use for the output.OutputType
getOutputType()
Returns the type of output to generate.protected Double
getResult(String key)
Returns a value from the cache.adams.opt.genetic.setupupload.AbstractSetupUpload
getSetupUpload()
Returns the scheme for uploading the currently best job setup.String
getSuppliedPrefix()
Returns the prefix to use in case ofOutputPrefixType.SUPPLIED
.weka.core.Instances
getTestInstances()
Returns the currently set test set (if null, cross-validation is used).String
measureTipText()
Returns the tip text for this property.protected abstract AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob
newJob(int chromosome, int[] w, weka.core.Instances data, weka.core.Instances testData)
Creates a new Job instance.String
outputDirectoryTipText()
Returns the tip text for this property.String
outputPrefixTypeTipText()
Returns the tip text for this property.String
outputTypeTipText()
Returns the tip text for this property.protected void
postRun(String error)
Further clean-ups in derived classes.protected void
preRun()
Some more initializations.void
setBitsPerGene(int value)
Sets the bits per gene to use.void
setClassifier(weka.classifiers.Classifier value)
Sets the classifier to use.void
setClassIndex(WekaAttributeIndex value)
Sets the class index.void
setClassLabelIndex(WekaLabelIndex value)
Sets the index of the class label to use for statistics that work on a per-label-basis.void
setCrossValidationSeed(int value)
Sets the seed value to use for cross-validation.void
setEvaluationPostProcessor(AbstractWekaEvaluationPostProcessor value)
Sets the post-processing scheme for the evaluation.void
setFlowContext(adams.flow.core.Actor value)
Sets the flow context, if any.void
setFolds(int value)
Sets the number of folds to use in cross-validation.void
setGenerator(CrossValidationFoldGenerator value)
Sets the scheme for generating the folds.void
setInstances(weka.core.Instances value)
Sets the data to use for cross-validation.void
setJobRunnerSetup(adams.flow.standalone.JobRunnerSetup value)
Sets the jobrunner setup to use.void
setMeasure(Measure value)
Sets the measure used for evaluating the fitness.void
setOutputDirectory(adams.core.io.PlaceholderDirectory value)
Sets the directory for the generated ARFF files.void
setOutputPrefixType(OutputPrefixType value)
Sets the type of prefix to use for the output.void
setOutputType(OutputType value)
Sets the type of output to generate.void
setSetupUpload(adams.opt.genetic.setupupload.AbstractSetupUpload value)
Sets the scheme for uploading the currently best job setup.void
setSuppliedPrefix(String value)
Sets the prefix to use in case ofOutputPrefixType.SUPPLIED
.void
setTestInstances(weka.core.Instances value)
Sets the currently set test set (if null, cross-validation is used).String
setupUploadTipText()
Returns the tip text for this property.void
stopExecution()
Stops the execution of the algorithm.protected adams.core.Properties
storeSetup(weka.core.Instances data, adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob job)
Generates a Properties file that stores information on the setup of the genetic algorithm.String
suppliedPrefixTipText()
Returns the tip text for this property.String
toString()
Returns a short string of the algorithm with the currently best fitness.weka.core.Instances
updateHeader(weka.core.Instances data, adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob job)
Creates a new dataset, with the setup as the new relation name.-
Methods inherited from class adams.opt.genetic.AbstractGeneticAlgorithm
addFitnessChangeListener, addToFitnessHistory, bestRangeTipText, copyGene, doCrossovers, doMutations, doMutations2, favorZeroesTipText, forCommandLine, forName, getBestRange, getCurrentIteration, getCurrentSetup, getCurrentWeights, getDefaultInitialSetupsProvider, getFavorZeroes, getFitness, getFitnessHistory, getGene, getGeneticAlgorithms, getInitialSetups, getInitialSetupsProvider, getInitialWeights, getMaxFitnessHistorySize, getNotificationInterval, getNumChrom, getNumGenes, getNumThreads, getSeed, getStoppingCriterion, hasMoreZeroes, init, initialize, initialSetupsProviderTipText, initialWeightsTipText, isBetterFitness, isPaused, isRunning, isStopped, logChromosomes, maxFitnessHistorySizeTipText, notificationIntervalTipText, notifyFitnessChangeListeners, notifyFitnessChangeListeners, numChromTipText, numThreadsTipText, pauseExecution, removeFitnessChangeListener, reset, resumeExecution, run, runGeneticAlgorithm, seedTipText, setBestRange, setBestRange, setFavorZeroes, setGene, setGene, setInitialSetupsProvider, setInitialWeights, setMaxFitnessHistorySize, setNewFitness, setNotificationInterval, setNumChrom, setNumThreads, setSeed, setStoppingCriterion, shallowCopy, shallowCopy, sort, stoppingCriterionTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
PROPS_RELATION
public static final String PROPS_RELATION
the key for the relation name in the generated properties file.- See Also:
- Constant Field Values
-
PROPS_FILTER
public static final String PROPS_FILTER
the key for a filter setup in the setup properties.- See Also:
- Constant Field Values
-
PROPS_MASK
public static final String PROPS_MASK
the key for the mask in the setup properties.- See Also:
- Constant Field Values
-
m_ClassIndex
protected WekaAttributeIndex m_ClassIndex
the class index.
-
m_Instances
protected weka.core.Instances m_Instances
the data to use for cross-validation.
-
m_TestInstances
protected weka.core.Instances m_TestInstances
the data to use for evaluation (if null, cross-validation is used).
-
m_BitsPerGene
protected int m_BitsPerGene
the bits per gene to use.
-
m_Classifier
protected weka.classifiers.Classifier m_Classifier
the classifier to use.
-
m_Folds
protected int m_Folds
the number of folds for cross-validation.
-
m_CrossValidationSeed
protected int m_CrossValidationSeed
the cross-validation seed.
-
m_Generator
protected CrossValidationFoldGenerator m_Generator
the fold generator.
-
m_Measure
protected Measure m_Measure
the measure to use for evaluating the fitness.
-
m_ClassLabelIndex
protected WekaLabelIndex m_ClassLabelIndex
the label index.
-
m_EvaluationPostProcessor
protected AbstractWekaEvaluationPostProcessor m_EvaluationPostProcessor
the postprocessor for the evaluation.
-
m_OutputDirectory
protected adams.core.io.PlaceholderDirectory m_OutputDirectory
the directory to store the generated ARFF files in.
-
m_OutputType
protected OutputType m_OutputType
the type of output to generate.
-
m_OutputPrefixType
protected OutputPrefixType m_OutputPrefixType
the type of prefix to use for the output.
-
m_SuppliedPrefix
protected String m_SuppliedPrefix
the supplied prefix.
-
m_SetupUpload
protected adams.opt.genetic.setupupload.AbstractSetupUpload m_SetupUpload
for uploading the setups.
-
m_JobRunnerSetup
protected transient adams.flow.standalone.JobRunnerSetup m_JobRunnerSetup
the jobrunner setup.
-
m_FlowContext
protected adams.flow.core.Actor m_FlowContext
the flow context.
-
m_JobRunner
protected adams.multiprocess.JobRunner<AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob> m_JobRunner
the job runner in use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.opt.genetic.AbstractGeneticAlgorithm
-
setClassIndex
public void setClassIndex(WekaAttributeIndex value)
Sets the class index.- Parameters:
value
- the class index
-
getClassIndex
public WekaAttributeIndex getClassIndex()
Returns the current class index.- Returns:
- the class index
-
classIndexTipText
public String classIndexTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setInstances
public void setInstances(weka.core.Instances value)
Sets the data to use for cross-validation.- Parameters:
value
- the dataset
-
getInstances
public weka.core.Instances getInstances()
Returns the currently set dataset for cross-validation.- Returns:
- the dataset
-
setTestInstances
public void setTestInstances(weka.core.Instances value)
Sets the currently set test set (if null, cross-validation is used).- Parameters:
value
- the dataset
-
getTestInstances
public weka.core.Instances getTestInstances()
Returns the currently set test set (if null, cross-validation is used).- Returns:
- the dataset
-
setFolds
public void setFolds(int value)
Sets the number of folds to use in cross-validation.- Parameters:
value
- the number of folds
-
getFolds
public int getFolds()
Returns the number of folds to use in cross-validation.- Returns:
- the number of folds
-
foldsTipText
public String foldsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCrossValidationSeed
public void setCrossValidationSeed(int value)
Sets the seed value to use for cross-validation.- Parameters:
value
- the seed to use
-
getCrossValidationSeed
public int getCrossValidationSeed()
Returns the current seed value for cross-validation.- Returns:
- the seed value
-
crossValidationSeedTipText
public String crossValidationSeedTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setGenerator
public void setGenerator(CrossValidationFoldGenerator value)
Sets the scheme for generating the folds.- Parameters:
value
- the generator
-
getGenerator
public CrossValidationFoldGenerator getGenerator()
Returns the scheme for generating the folds.- Returns:
- the generator
-
generatorTipText
public String generatorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultClassifier
protected weka.classifiers.Classifier getDefaultClassifier()
Returns the default classifier to use.- Returns:
- the classifier
-
setClassifier
public void setClassifier(weka.classifiers.Classifier value)
Sets the classifier to use.- Parameters:
value
- the classifier
-
getClassifier
public weka.classifiers.Classifier getClassifier()
Returns the currently set classifier.- Returns:
- the classifier
-
classifierTipText
public String classifierTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBitsPerGene
public void setBitsPerGene(int value)
Sets the bits per gene to use.- Parameters:
value
- the number of bits
-
getBitsPerGene
public int getBitsPerGene()
Returns the currently set number of bits per gene.- Returns:
- the number of bits
-
bitsPerGeneTipText
public String bitsPerGeneTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMeasure
public void setMeasure(Measure value)
Sets the measure used for evaluating the fitness.- Parameters:
value
- the fitness measure
-
getMeasure
public Measure getMeasure()
Returns the current measure for evaluating the fitness.- Returns:
- the measure
-
measureTipText
public String measureTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setClassLabelIndex
public void setClassLabelIndex(WekaLabelIndex value)
Sets the index of the class label to use for statistics that work on a per-label-basis.- Parameters:
value
- the index
-
getClassLabelIndex
public WekaLabelIndex getClassLabelIndex()
Returns the index of the class label to use for statistics that work on a per-label-basis.- Returns:
- the index
-
classLabelIndexTipText
public String classLabelIndexTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEvaluationPostProcessor
public void setEvaluationPostProcessor(AbstractWekaEvaluationPostProcessor value)
Sets the post-processing scheme for the evaluation.- Parameters:
value
- the post-processor
-
getEvaluationPostProcessor
public AbstractWekaEvaluationPostProcessor getEvaluationPostProcessor()
Returns the post-processing scheme for the evaluation.- Returns:
- the post-processor
-
evaluationPostProcessorTipText
public String evaluationPostProcessorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputDirectory
public void setOutputDirectory(adams.core.io.PlaceholderDirectory value)
Sets the directory for the generated ARFF files.- Parameters:
value
- the directory
-
getOutputDirectory
public adams.core.io.PlaceholderDirectory getOutputDirectory()
Returns the currently set directory for the generated ARFF files.- Returns:
- the directory
-
outputDirectoryTipText
public String outputDirectoryTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultOutputType
protected abstract OutputType getDefaultOutputType()
Returns the default output type to use.- Returns:
- the type
-
setOutputType
public void setOutputType(OutputType value)
Sets the type of output to generate.- Parameters:
value
- the type
-
getOutputType
public OutputType getOutputType()
Returns the type of output to generate.- Returns:
- the type
-
outputTypeTipText
public String outputTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputPrefixType
public void setOutputPrefixType(OutputPrefixType value)
Sets the type of prefix to use for the output.- Parameters:
value
- the type
-
getOutputPrefixType
public OutputPrefixType getOutputPrefixType()
Returns the type of prefix to use for the output.- Returns:
- the type
-
outputPrefixTypeTipText
public String outputPrefixTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSuppliedPrefix
public void setSuppliedPrefix(String value)
Sets the prefix to use in case ofOutputPrefixType.SUPPLIED
.- Parameters:
value
- the prefix
-
getSuppliedPrefix
public String getSuppliedPrefix()
Returns the prefix to use in case ofOutputPrefixType.SUPPLIED
.- Returns:
- the number of folds
-
suppliedPrefixTipText
public String suppliedPrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSetupUpload
public void setSetupUpload(adams.opt.genetic.setupupload.AbstractSetupUpload value)
Sets the scheme for uploading the currently best job setup.- Parameters:
value
- the upload scheme
-
getSetupUpload
public adams.opt.genetic.setupupload.AbstractSetupUpload getSetupUpload()
Returns the scheme for uploading the currently best job setup.- Returns:
- the upload scheme
-
setupUploadTipText
public String setupUploadTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setJobRunnerSetup
public void setJobRunnerSetup(adams.flow.standalone.JobRunnerSetup value)
Sets the jobrunner setup to use.- Parameters:
value
- the setup, can be null to use default
-
getJobRunnerSetup
public adams.flow.standalone.JobRunnerSetup getJobRunnerSetup()
Returns the jobrunner setup in use.- Returns:
- the setup, null if using default
-
setFlowContext
public void setFlowContext(adams.flow.core.Actor value)
Sets the flow context, if any.- Parameters:
value
- the context
-
getFlowContext
public adams.flow.core.Actor getFlowContext()
Return the flow context, if any.- Returns:
- the context, null if none available
-
getCurrentFitness
public double getCurrentFitness()
Returns the currently best fitness.- Specified by:
getCurrentFitness
in interfaceadams.event.GeneticFitnessChangeNotifier
- Overrides:
getCurrentFitness
in classadams.opt.genetic.AbstractGeneticAlgorithm
- Returns:
- the best fitness so far
-
storeSetup
protected adams.core.Properties storeSetup(weka.core.Instances data, adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob job)
Generates a Properties file that stores information on the setup of the genetic algorithm. E.g., it backs up the original relation name. The generated properties file will be used as new relation name for the data. Derived classes can add additional parameters to this properties file.- Parameters:
data
- the data to create the setup forjob
- the associated job- Returns:
- the generated setup
- See Also:
PROPS_RELATION
-
updateHeader
public weka.core.Instances updateHeader(weka.core.Instances data, adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob job)
Creates a new dataset, with the setup as the new relation name.- Parameters:
data
- the data to replace the relation name with the setupjob
- the associated job- Returns:
- the updated dataset
-
addResult
protected void addResult(String key, Double val)
Adds a result to the cache.- Parameters:
key
- the key of the resultval
- the value to add
-
getResult
protected Double getResult(String key)
Returns a value from the cache.- Parameters:
key
- the key of the result- Returns:
- the result or null if not present
-
clearResults
protected void clearResults()
Clears all currently stored results.
-
newJob
protected abstract AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob newJob(int chromosome, int[] w, weka.core.Instances data, weka.core.Instances testData)
Creates a new Job instance.- Parameters:
chromosome
- the chromosome indexw
- the initial weightsdata
- the data to usetestData
- the test data to use, null for cross-validation- Returns:
- the instance
-
calcFitness
public void calcFitness()
Calculates the fitness of the population.- Specified by:
calcFitness
in classadams.opt.genetic.AbstractGeneticAlgorithm
-
preRun
protected void preRun()
Some more initializations.- Overrides:
preRun
in classadams.opt.genetic.AbstractGeneticAlgorithm
-
postRun
protected void postRun(String error) throws Exception
Further clean-ups in derived classes.- Overrides:
postRun
in classadams.opt.genetic.AbstractGeneticAlgorithm
- Parameters:
error
- null if successful, otherwise error message- Throws:
Exception
- if something goes wrong
-
stopExecution
public void stopExecution()
Stops the execution of the algorithm.- Specified by:
stopExecution
in interfaceadams.core.Stoppable
- Overrides:
stopExecution
in classadams.opt.genetic.AbstractGeneticAlgorithm
-
toString
public String toString()
Returns a short string of the algorithm with the currently best fitness.- Overrides:
toString
in classadams.core.option.AbstractOptionHandler
- Returns:
- a short info string
-
-