Class ProbabilisticMonteCarloCrossValidationEvaluator

  • All Implemented Interfaces:
    ai.libs.jaicore.basic.IInformedObjectEvaluatorExtension<java.lang.Double>, ai.libs.jaicore.basic.ILoggingCustomizable, ai.libs.jaicore.basic.IObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>, IClassifierEvaluator

    public class ProbabilisticMonteCarloCrossValidationEvaluator
    extends java.lang.Object
    implements IClassifierEvaluator, ai.libs.jaicore.basic.IInformedObjectEvaluatorExtension<java.lang.Double>, ai.libs.jaicore.basic.ILoggingCustomizable
    A classifier evaluator that can perform a (monte-carlo)cross-validation on the given dataset. Thereby, it uses the AbstractSplitBasedClassifierEvaluator to evaluate the classifier on a random split of the dataset. This probabilistic version can be used to speed up the process by early termination based on a threshold value that has to be beaten by the evaluation. If it is unlikely after the first repeats that this is possible the unfinished, not as precise result will be returned.
    • Constructor Detail

      • ProbabilisticMonteCarloCrossValidationEvaluator

        public ProbabilisticMonteCarloCrossValidationEvaluator​(ISplitBasedClassifierEvaluator<java.lang.Double> bridge,
                                                               IDatasetSplitter datasetSplitter,
                                                               int repeats,
                                                               double bestscore,
                                                               weka.core.Instances data,
                                                               double trainingPortion,
                                                               long seed)
    • Method Detail

      • updateBestScore

        public void updateBestScore​(java.lang.Double bestScore)
        Specified by:
        updateBestScore in interface ai.libs.jaicore.basic.IInformedObjectEvaluatorExtension<java.lang.Double>
      • cancel

        public void cancel()
      • evaluate

        public java.lang.Double evaluate​(weka.classifiers.Classifier pl)
                                  throws ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException,
                                         java.lang.InterruptedException
        Specified by:
        evaluate in interface ai.libs.jaicore.basic.IObjectEvaluator<weka.classifiers.Classifier,​java.lang.Double>
        Throws:
        ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException
        java.lang.InterruptedException
      • evaluate

        public java.lang.Double evaluate​(weka.classifiers.Classifier pl,
                                         org.apache.commons.math3.stat.descriptive.DescriptiveStatistics stats)
                                  throws ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException,
                                         java.lang.InterruptedException
        Throws:
        ai.libs.jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException
        java.lang.InterruptedException
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizable
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizable