InputDataType
- The type of the data to perform the experiment with.
This will be passed to the fold creator to create a number of folds
on which to validate the performance of the learning algorithm.FoldDataType
- The type of data created by the fold creator that will go into
the learning algorithm. Typically, this is the same as the
InputDataType, but it does not need to be. It just needs to match
the output of the fold creator and the input of the learning
algorithm.LearnedType
- The type of the output produced by the learning
algorithm whose performance will be evaluated on each fold of data.StatisticType
- The type of the statistic generated by the
performance evaluator on the learned object for each fold. It is
created by passing the learned object plus the test data for the
fold into the performance evaluator.SummaryType
- The type produced by the summarizer at the end of
the experiment from a collection of the given statistics (one for
each fold). This represents the performance result for the learning
algorithm for the whole experiment.public class ParallelLearnerValidationExperiment<InputDataType,FoldDataType,LearnedType,StatisticType,SummaryType> extends LearnerValidationExperiment<InputDataType,FoldDataType,LearnedType,StatisticType,SummaryType> implements ParallelAlgorithm
performanceEvaluator, statistics, summarizer, summary
foldCreator, numTrials
listeners
Constructor and Description |
---|
ParallelLearnerValidationExperiment()
Default constructor
|
ParallelLearnerValidationExperiment(ValidationFoldCreator<InputDataType,FoldDataType> foldCreator,
PerformanceEvaluator<? super LearnedType,? super java.util.Collection<? extends FoldDataType>,? extends StatisticType> performanceEvaluator,
Summarizer<? super StatisticType,? extends SummaryType> summarizer)
Creates a new instance of ParallelLearnerValidationExperiment.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumThreads()
Gets the number of threads in the thread pool.
|
java.util.concurrent.ThreadPoolExecutor |
getThreadPool()
Gets the thread pool for the algorithm to use.
|
protected void |
runExperiment(java.util.Collection<PartitionedDataset<FoldDataType>> folds)
Runs the underlying validation fold experiment using the given data.
|
void |
setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
Sets the thread pool for the algorithm to use.
|
evaluate, evaluatePerformance, getLearner, getPerformanceEvaluator, getStatistics, getSummarizer, getSummary, runTrial, setLearner, setPerformanceEvaluator, setStatistics, setSummarizer, setSummary
getFoldCreator, getNumTrials, setFoldCreator, setNumTrials
addListener, fireExperimentEnded, fireExperimentStarted, fireTrialEnded, fireTrialStarted, getListeners, removeListener, setListeners
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public ParallelLearnerValidationExperiment()
public ParallelLearnerValidationExperiment(ValidationFoldCreator<InputDataType,FoldDataType> foldCreator, PerformanceEvaluator<? super LearnedType,? super java.util.Collection<? extends FoldDataType>,? extends StatisticType> performanceEvaluator, Summarizer<? super StatisticType,? extends SummaryType> summarizer)
foldCreator
- The object to use for creating the folds.performanceEvaluator
- The evaluator to use to compute the
performance of the learned object on each fold.summarizer
- The summarizer for summarizing the result of the
performance evaluator from all the folds.protected void runExperiment(java.util.Collection<PartitionedDataset<FoldDataType>> folds)
AbstractValidationFoldExperiment
runExperiment
in class AbstractValidationFoldExperiment<InputDataType,FoldDataType>
folds
- The fold to run the experiment on.public java.util.concurrent.ThreadPoolExecutor getThreadPool()
ParallelAlgorithm
getThreadPool
in interface ParallelAlgorithm
public void setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
ParallelAlgorithm
setThreadPool
in interface ParallelAlgorithm
threadPool
- Thread pool used for parallelization.public int getNumThreads()
ParallelAlgorithm
getNumThreads
in interface ParallelAlgorithm