Package adams.opt.genetic
Class DarkLord.DarkLordJob
- java.lang.Object
-
- All Implemented Interfaces:
CleanUpHandler
,LoggingLevelHandler
,LoggingSupporter
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,Job
,JobWithOwner<DarkLord>
,Serializable
- Enclosing class:
- DarkLord
public static class DarkLord.DarkLordJob extends AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob<DarkLord>
A job class specific to The Dark Lord.- Version:
- $Revision: 4322 $
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob
m_SecondFitness, m_SecondFolds, m_SecondSeed, m_UseSecondEvaluation
-
Fields inherited from class adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob
m_ClassLabelIndex, m_Data, m_Folds, m_Measure, m_Seed, m_TestData
-
Fields inherited from class adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob
m_Chromosome, m_Fitness, m_Genetic, m_Weights
-
Fields inherited from class adams.multiprocess.AbstractJob
m_Complete, m_ExecutionError, m_JobCompleteListener, m_JobInfo, m_ProgressInfo, m_Stopped
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DarkLordJob(DarkLord g, int num, int[] w, weka.core.Instances data, weka.core.Instances testData)
Initializes the job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
assembleSetup(double fitness, weka.classifiers.Classifier cls, int chromosome, int[] weights)
Assembles the data for the textual setup output.void
calcNewFitness()
Calculates the new fitness.String
getMaskAsString()
Returns the "mask" of attributes as range string.String
getRemoveAsString()
Generates a range string of attributes to keep (= one has to use the inverse matching sense with the Remove filter).-
Methods inherited from class adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob
getSecondFitness, getSecondFolds, getSecondSeed, getUseSecondEvaluation
-
Methods inherited from class adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob
createFileName, evaluateClassifier, evaluateClassifier, generateOutput, getFolds, getInstances, getMeasure, getSeed, getTestInstances, outputDataset, outputSetup, postProcess, preProcessCheck
-
Methods inherited from class adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob
cleanUp, getChromosome, getFitness, getOwner, getWeights, postProcessCheck, process, toString, weightsToString, weightsToString
-
Methods inherited from class adams.multiprocess.AbstractJob
execute, getAdditionalErrorInformation, getExecutionError, getJobCompleteListener, getJobInfo, getProgressInfo, hasExecutionError, isComplete, isStopped, jobCompleted, setJobCompleteListener, setJobInfo, setProgressInfo, stopExecution
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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
-
Methods inherited from interface adams.multiprocess.Job
execute, getExecutionError, getJobCompleteListener, getJobInfo, hasExecutionError, isComplete, jobCompleted, setJobCompleteListener
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
Methods inherited from interface adams.core.StoppableWithFeedback
isStopped
-
-
-
-
Constructor Detail
-
DarkLordJob
public DarkLordJob(DarkLord g, int num, int[] w, weka.core.Instances data, weka.core.Instances testData)
Initializes the job.- Parameters:
g
- the algorithm object this job belongs tonum
- the number of chromsomesw
- the initial weightsdata
- the data to usetestData
- the test data to use, null for cross-validation
-
-
Method Detail
-
getMaskAsString
public String getMaskAsString()
Returns the "mask" of attributes as range string.- Returns:
- the mask
-
getRemoveAsString
public String getRemoveAsString()
Generates a range string of attributes to keep (= one has to use the inverse matching sense with the Remove filter).- Returns:
- the range of attributes to keep
-
assembleSetup
protected Map<String,Object> assembleSetup(double fitness, weka.classifiers.Classifier cls, int chromosome, int[] weights)
Assembles the data for the textual setup output.- Overrides:
assembleSetup
in classAbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob<DarkLord>
- Parameters:
fitness
- the current fitnesscls
- the current classifierchromosome
- the chromosome responsibleweights
- the current weights- Returns:
- the data
-
calcNewFitness
public void calcNewFitness()
Calculates the new fitness.- Specified by:
calcNewFitness
in classAbstractGeneticAlgorithm.GeneticAlgorithmJob<DarkLord>
-
-