类 EvaluationUtils
java.lang.Object
weka.classifiers.evaluation.EvaluationUtils
- 所有已实现的接口:
RevisionHandler
Contains utility functions for generating lists of predictions in
various manners.
- 版本:
- $Revision: 1.11 $
- 作者:
- Len Trigg (len@reeltwo.com)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getCVPredictions
(Classifier classifier, Instances data, int numFolds) Generate a bunch of predictions ready for processing, by performing a cross-validation on the supplied dataset.getPrediction
(Classifier classifier, Instance test) Generate a single prediction for a test instance given the pre-trained classifier.Returns the revision string.int
getSeed()
Gets the seed for randomization during cross-validationgetTestPredictions
(Classifier classifier, Instances test) Generate a bunch of predictions ready for processing, by performing a evaluation on a test set assuming the classifier is already trained.getTrainTestPredictions
(Classifier classifier, Instances train, Instances test) Generate a bunch of predictions ready for processing, by performing a evaluation on a test set after training on the given training set.void
setSeed
(int seed) Sets the seed for randomization during cross-validation
-
构造器详细资料
-
EvaluationUtils
public EvaluationUtils()
-
-
方法详细资料
-
setSeed
public void setSeed(int seed) Sets the seed for randomization during cross-validation -
getSeed
public int getSeed()Gets the seed for randomization during cross-validation -
getCVPredictions
public FastVector getCVPredictions(Classifier classifier, Instances data, int numFolds) throws Exception Generate a bunch of predictions ready for processing, by performing a cross-validation on the supplied dataset.- 参数:
classifier
- the Classifier to evaluatedata
- the datasetnumFolds
- the number of folds in the cross-validation.- 抛出:
Exception
- if an error occurs
-
getTrainTestPredictions
public FastVector getTrainTestPredictions(Classifier classifier, Instances train, Instances test) throws Exception Generate a bunch of predictions ready for processing, by performing a evaluation on a test set after training on the given training set.- 参数:
classifier
- the Classifier to evaluatetrain
- the training datasettest
- the test dataset- 抛出:
Exception
- if an error occurs
-
getTestPredictions
Generate a bunch of predictions ready for processing, by performing a evaluation on a test set assuming the classifier is already trained.- 参数:
classifier
- the pre-trained Classifier to evaluatetest
- the test dataset- 抛出:
Exception
- if an error occurs
-
getPrediction
Generate a single prediction for a test instance given the pre-trained classifier.- 参数:
classifier
- the pre-trained Classifier to evaluatetest
- the test instance- 抛出:
Exception
- if an error occurs
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-