Package weka.experiment
Class CrossValidationSplitResultProducer
- java.lang.Object
-
- weka.experiment.CrossValidationResultProducer
-
- weka.experiment.CrossValidationSplitResultProducer
-
- All Implemented Interfaces:
java.io.Serializable,AdditionalMeasureProducer,OptionHandler,RevisionHandler,ResultProducer
public class CrossValidationSplitResultProducer extends CrossValidationResultProducer
Carries out one split of a repeated k-fold cross-validation, using the set SplitEvaluator to generate some results. Note that the run number is actually the nth split of a repeated k-fold cross-validation, i.e. if k=10, run number 100 is the 10th fold of the 10th cross-validation run. This producer's sole purpose is to allow more fine-grained distribution of cross-validation experiments. If the class attribute is nominal, the dataset is stratified. Valid options are:-X <number of folds> The number of folds to use for the cross-validation. (default 10)
-D Save raw split evaluator output.
-O <file/directory name/path> The filename where raw output will be stored. If a directory name is specified then then individual outputs will be gzipped, otherwise all output will be zipped to the named file. Use in conjuction with -D. (default splitEvalutorOut.zip)
-W <class name> The full class name of a SplitEvaluator. eg: weka.experiment.ClassifierSplitEvaluator
Options specific to split evaluator weka.experiment.ClassifierSplitEvaluator:
-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
All options after -- will be passed to the split evaluator.- Version:
- $Revision: 10203 $
- Author:
- Len Trigg, Eibe Frank
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class weka.experiment.CrossValidationResultProducer
DATASET_FIELD_NAME, FOLD_FIELD_NAME, RUN_FIELD_NAME, TIMESTAMP_FIELD_NAME
-
-
Constructor Summary
Constructors Constructor Description CrossValidationSplitResultProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoRun(int run)Gets the results for a specified run number.voiddoRunKeys(int run)Gets the keys for a specified run number.java.lang.StringgetRevision()Returns the revision string.java.lang.StringglobalInfo()Returns a string describing this result producerjava.lang.StringtoString()Gets a text descrption of the result producer.-
Methods inherited from class weka.experiment.CrossValidationResultProducer
enumerateMeasures, getCompatibilityState, getKeyNames, getKeyTypes, getMeasure, getNumFolds, getOptions, getOutputFile, getRawOutput, getResultNames, getResultTypes, getSplitEvaluator, getTimestamp, listOptions, main, numFoldsTipText, outputFileTipText, postProcess, preProcess, rawOutputTipText, setAdditionalMeasures, setInstances, setNumFolds, setOptions, setOutputFile, setRawOutput, setResultListener, setSplitEvaluator, splitEvaluatorTipText
-
-
-
-
Method Detail
-
globalInfo
public java.lang.String globalInfo()
Returns a string describing this result producer- Overrides:
globalInfoin classCrossValidationResultProducer- Returns:
- a description of the result producer suitable for displaying in the explorer/experimenter gui
-
doRunKeys
public void doRunKeys(int run) throws java.lang.ExceptionGets the keys for a specified run number. Different run numbers correspond to different randomizations of the data. Keys produced should be sent to the current ResultListener- Specified by:
doRunKeysin interfaceResultProducer- Overrides:
doRunKeysin classCrossValidationResultProducer- Parameters:
run- the run number to get keys for.- Throws:
java.lang.Exception- if a problem occurs while getting the keys
-
doRun
public void doRun(int run) throws java.lang.ExceptionGets the results for a specified run number. Different run numbers correspond to different randomizations of the data. Results produced should be sent to the current ResultListener- Specified by:
doRunin interfaceResultProducer- Overrides:
doRunin classCrossValidationResultProducer- Parameters:
run- the run number to get results for.- Throws:
java.lang.Exception- if a problem occurs while getting the results
-
toString
public java.lang.String toString()
Gets a text descrption of the result producer.- Overrides:
toStringin classCrossValidationResultProducer- Returns:
- a text description of the result producer.
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classCrossValidationResultProducer- Returns:
- the revision
-
-