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.GeneticFitnessChangeNotifierAncestor 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 classAbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob<T extends AbstractClassifierBasedGeneticAlgorithm>Job class for algorithms with datasets.
-
Field Summary
Fields Modifier and Type Field Description protected intm_BitsPerGenethe bits per gene to use.protected weka.classifiers.Classifierm_Classifierthe classifier to use.protected WekaAttributeIndexm_ClassIndexthe class index.protected WekaLabelIndexm_ClassLabelIndexthe label index.protected intm_CrossValidationSeedthe cross-validation seed.protected AbstractWekaEvaluationPostProcessorm_EvaluationPostProcessorthe postprocessor for the evaluation.protected adams.flow.core.Actorm_FlowContextthe flow context.protected intm_Foldsthe number of folds for cross-validation.protected CrossValidationFoldGeneratorm_Generatorthe fold generator.protected weka.core.Instancesm_Instancesthe data to use for cross-validation.protected adams.multiprocess.JobRunner<AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob>m_JobRunnerthe job runner in use.protected adams.flow.standalone.JobRunnerSetupm_JobRunnerSetupthe jobrunner setup.protected Measurem_Measurethe measure to use for evaluating the fitness.protected adams.core.io.PlaceholderDirectorym_OutputDirectorythe directory to store the generated ARFF files in.protected OutputPrefixTypem_OutputPrefixTypethe type of prefix to use for the output.protected OutputTypem_OutputTypethe type of output to generate.protected adams.opt.genetic.setupupload.AbstractSetupUploadm_SetupUploadfor uploading the setups.Hashtable<String,Double>m_StoredResultsthe cache for results.protected Stringm_SuppliedPrefixthe supplied prefix.protected weka.core.Instancesm_TestInstancesthe data to use for evaluation (if null, cross-validation is used).static StringPROPS_FILTERthe key for a filter setup in the setup properties.static StringPROPS_MASKthe key for the mask in the setup properties.static StringPROPS_RELATIONthe 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 voidaddResult(String key, Double val)Adds a result to the cache.StringbitsPerGeneTipText()Returns the tip text for this property.voidcalcFitness()Calculates the fitness of the population.StringclassifierTipText()Returns the tip text for this property.StringclassIndexTipText()Returns the tip text for this property.StringclassLabelIndexTipText()Returns the tip text for this property.protected voidclearResults()Clears all currently stored results.StringcrossValidationSeedTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringevaluationPostProcessorTipText()Returns the tip text for this property.StringfoldsTipText()Returns the tip text for this property.StringgeneratorTipText()Returns the tip text for this property.intgetBitsPerGene()Returns the currently set number of bits per gene.weka.classifiers.ClassifiergetClassifier()Returns the currently set classifier.WekaAttributeIndexgetClassIndex()Returns the current class index.WekaLabelIndexgetClassLabelIndex()Returns the index of the class label to use for statistics that work on a per-label-basis.intgetCrossValidationSeed()Returns the current seed value for cross-validation.doublegetCurrentFitness()Returns the currently best fitness.protected weka.classifiers.ClassifiergetDefaultClassifier()Returns the default classifier to use.protected abstract OutputTypegetDefaultOutputType()Returns the default output type to use.AbstractWekaEvaluationPostProcessorgetEvaluationPostProcessor()Returns the post-processing scheme for the evaluation.adams.flow.core.ActorgetFlowContext()Return the flow context, if any.intgetFolds()Returns the number of folds to use in cross-validation.CrossValidationFoldGeneratorgetGenerator()Returns the scheme for generating the folds.weka.core.InstancesgetInstances()Returns the currently set dataset for cross-validation.adams.flow.standalone.JobRunnerSetupgetJobRunnerSetup()Returns the jobrunner setup in use.MeasuregetMeasure()Returns the current measure for evaluating the fitness.adams.core.io.PlaceholderDirectorygetOutputDirectory()Returns the currently set directory for the generated ARFF files.OutputPrefixTypegetOutputPrefixType()Returns the type of prefix to use for the output.OutputTypegetOutputType()Returns the type of output to generate.protected DoublegetResult(String key)Returns a value from the cache.adams.opt.genetic.setupupload.AbstractSetupUploadgetSetupUpload()Returns the scheme for uploading the currently best job setup.StringgetSuppliedPrefix()Returns the prefix to use in case ofOutputPrefixType.SUPPLIED.weka.core.InstancesgetTestInstances()Returns the currently set test set (if null, cross-validation is used).StringmeasureTipText()Returns the tip text for this property.protected abstract AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJobnewJob(int chromosome, int[] w, weka.core.Instances data, weka.core.Instances testData)Creates a new Job instance.StringoutputDirectoryTipText()Returns the tip text for this property.StringoutputPrefixTypeTipText()Returns the tip text for this property.StringoutputTypeTipText()Returns the tip text for this property.protected voidpostRun(String error)Further clean-ups in derived classes.protected voidpreRun()Some more initializations.voidsetBitsPerGene(int value)Sets the bits per gene to use.voidsetClassifier(weka.classifiers.Classifier value)Sets the classifier to use.voidsetClassIndex(WekaAttributeIndex value)Sets the class index.voidsetClassLabelIndex(WekaLabelIndex value)Sets the index of the class label to use for statistics that work on a per-label-basis.voidsetCrossValidationSeed(int value)Sets the seed value to use for cross-validation.voidsetEvaluationPostProcessor(AbstractWekaEvaluationPostProcessor value)Sets the post-processing scheme for the evaluation.voidsetFlowContext(adams.flow.core.Actor value)Sets the flow context, if any.voidsetFolds(int value)Sets the number of folds to use in cross-validation.voidsetGenerator(CrossValidationFoldGenerator value)Sets the scheme for generating the folds.voidsetInstances(weka.core.Instances value)Sets the data to use for cross-validation.voidsetJobRunnerSetup(adams.flow.standalone.JobRunnerSetup value)Sets the jobrunner setup to use.voidsetMeasure(Measure value)Sets the measure used for evaluating the fitness.voidsetOutputDirectory(adams.core.io.PlaceholderDirectory value)Sets the directory for the generated ARFF files.voidsetOutputPrefixType(OutputPrefixType value)Sets the type of prefix to use for the output.voidsetOutputType(OutputType value)Sets the type of output to generate.voidsetSetupUpload(adams.opt.genetic.setupupload.AbstractSetupUpload value)Sets the scheme for uploading the currently best job setup.voidsetSuppliedPrefix(String value)Sets the prefix to use in case ofOutputPrefixType.SUPPLIED.voidsetTestInstances(weka.core.Instances value)Sets the currently set test set (if null, cross-validation is used).StringsetupUploadTipText()Returns the tip text for this property.voidstopExecution()Stops the execution of the algorithm.protected adams.core.PropertiesstoreSetup(weka.core.Instances data, adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob job)Generates a Properties file that stores information on the setup of the genetic algorithm.StringsuppliedPrefixTipText()Returns the tip text for this property.StringtoString()Returns a short string of the algorithm with the currently best fitness.weka.core.InstancesupdateHeader(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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin 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:
getCurrentFitnessin interfaceadams.event.GeneticFitnessChangeNotifier- Overrides:
getCurrentFitnessin 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:
calcFitnessin classadams.opt.genetic.AbstractGeneticAlgorithm
-
preRun
protected void preRun()
Some more initializations.- Overrides:
preRunin classadams.opt.genetic.AbstractGeneticAlgorithm
-
postRun
protected void postRun(String error) throws Exception
Further clean-ups in derived classes.- Overrides:
postRunin 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:
stopExecutionin interfaceadams.core.Stoppable- Overrides:
stopExecutionin classadams.opt.genetic.AbstractGeneticAlgorithm
-
toString
public String toString()
Returns a short string of the algorithm with the currently best fitness.- Overrides:
toStringin classadams.core.option.AbstractOptionHandler- Returns:
- a short info string
-
-