All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.evaluation.EvaluationUtils

java.lang.Object
   |
   +----weka.classifiers.evaluation.EvaluationUtils

public class EvaluationUtils
extends Object
Contains utility functions for generating lists of predictions in various manners.

Author:
Len Trigg (len@intelligenesis.net)

Constructor Index

 o EvaluationUtils()

Method Index

 o getCVPredictions(DistributionClassifier, Instances, int)
Generate a bunch of predictions ready for processing, by performing a cross-validation on the supplied dataset.
 o getPrediction(DistributionClassifier, Instance)
Generate a single prediction for a test instance given the pre-trained classifier.
 o getSeed()
Gets the seed for randomization during cross-validation
 o getTestPredictions(DistributionClassifier, Instances)
Generate a bunch of predictions ready for processing, by performing a evaluation on a test set assuming the classifier is already trained.
 o getTrainTestPredictions(DistributionClassifier, Instances, Instances)
Generate a bunch of predictions ready for processing, by performing a evaluation on a test set after training on the given training set.
 o setSeed(int)
Sets the seed for randomization during cross-validation

Constructors

 o EvaluationUtils
 public EvaluationUtils()

Methods

 o setSeed
 public void setSeed(int seed)
Sets the seed for randomization during cross-validation

 o getSeed
 public int getSeed()
Gets the seed for randomization during cross-validation

 o getCVPredictions
 public FastVector getCVPredictions(DistributionClassifier classifier,
                                    Instances data,
                                    int numFolds) throws Exception
Generate a bunch of predictions ready for processing, by performing a cross-validation on the supplied dataset.

Parameters:
classifier - the DistributionClassifier to evaluate
data - the dataset
numFolds - the number of folds in the cross-validation.
Throws: Exception
if an error occurs
 o getTrainTestPredictions
 public FastVector getTrainTestPredictions(DistributionClassifier 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.

Parameters:
classifier - the DistributionClassifier to evaluate
train - the training dataset
test - the test dataset
Throws: Exception
if an error occurs
 o getTestPredictions
 public FastVector getTestPredictions(DistributionClassifier classifier,
                                      Instances test) throws Exception
Generate a bunch of predictions ready for processing, by performing a evaluation on a test set assuming the classifier is already trained.

Parameters:
classifier - the pre-trained DistributionClassifier to evaluate
test - the test dataset
Throws: Exception
if an error occurs
 o getPrediction
 public Prediction getPrediction(DistributionClassifier classifier,
                                 Instance test) throws Exception
Generate a single prediction for a test instance given the pre-trained classifier.

Parameters:
classifier - the pre-trained DistributionClassifier to evaluate
test - the test instance
Throws: Exception
if an error occurs

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home