Package adams.opt.genetic
Class AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob<T extends AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.multiprocess.AbstractJob
-
- adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob<T>
-
- adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob<T>
-
- adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob<T>
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.multiprocess.Job
,adams.multiprocess.JobWithOwner<T>
,Serializable
- Direct Known Subclasses:
DarkLord.DarkLordJob
,Hermione.HermioneJob
- Enclosing class:
- AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation
public abstract static class AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob<T extends AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation> extends AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob<T>
Job class for algorithms with datasets.- Version:
- $Revision: 4322 $
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Double
m_SecondFitness
the current fitness (second evaluation).protected int
m_SecondFolds
the cross-validation folds (second evaluation).protected int
m_SecondSeed
the cross-validation seed (second evaluation).protected boolean
m_UseSecondEvaluation
whether to use second evaluation.-
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
-
-
Constructor Summary
Constructors Constructor Description ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob(T g, int chromosome, 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 Double
getSecondFitness()
Returns the fitness (second evaluation).int
getSecondFolds()
Returns the number of cross-validation folds (second evaluation).int
getSecondSeed()
Returns the cross-validation seed (second evaluation).boolean
getUseSecondEvaluation()
Returns the whether to use second evaluation.-
Methods inherited from class adams.opt.genetic.AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob
assembleSetup, createFileName, evaluateClassifier, evaluateClassifier, generateOutput, getFolds, getInstances, getMeasure, getSeed, getTestInstances, outputDataset, outputSetup, postProcess, preProcessCheck
-
Methods inherited from class adams.opt.genetic.AbstractGeneticAlgorithm.GeneticAlgorithmJob
calcNewFitness, 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.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
-
m_UseSecondEvaluation
protected boolean m_UseSecondEvaluation
whether to use second evaluation.
-
m_SecondFitness
protected Double m_SecondFitness
the current fitness (second evaluation).
-
m_SecondSeed
protected int m_SecondSeed
the cross-validation seed (second evaluation).
-
m_SecondFolds
protected int m_SecondFolds
the cross-validation folds (second evaluation).
-
-
Constructor Detail
-
ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob
public ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob(T g, int chromosome, int[] w, weka.core.Instances data, weka.core.Instances testData)
Initializes the job.- Parameters:
g
- the algorithm object this job belongs tochromosome
- the chromsome indexw
- the initial weightsdata
- the data to usetestData
- the test data to use, null for cross-validation
-
-
Method Detail
-
getUseSecondEvaluation
public boolean getUseSecondEvaluation()
Returns the whether to use second evaluation.- Returns:
- true if to use second evaluation
-
getSecondSeed
public int getSecondSeed()
Returns the cross-validation seed (second evaluation).- Returns:
- the seed
-
getSecondFolds
public int getSecondFolds()
Returns the number of cross-validation folds (second evaluation).- Returns:
- the number of folds
-
getSecondFitness
public Double getSecondFitness()
Returns the fitness (second evaluation).- Returns:
- the fitness
-
-