public class EvaluationUtils extends java.lang.Object implements RevisionHandler
| Constructor and Description |
|---|
EvaluationUtils() |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<Prediction> |
getCVPredictions(Classifier classifier,
Instances data,
int numFolds)
Generate a bunch of predictions ready for processing, by performing a
cross-validation on the supplied dataset.
|
Prediction |
getPrediction(Classifier classifier,
Instance test)
Generate a single prediction for a test instance given the pre-trained
classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSeed()
Gets the seed for randomization during cross-validation
|
java.util.ArrayList<Prediction> |
getTestPredictions(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.
|
java.util.ArrayList<Prediction> |
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
|
public void setSeed(int seed)
public int getSeed()
public java.util.ArrayList<Prediction> getCVPredictions(Classifier classifier, Instances data, int numFolds) throws java.lang.Exception
classifier - the Classifier to evaluatedata - the datasetnumFolds - the number of folds in the cross-validation.java.lang.Exception - if an error occurspublic java.util.ArrayList<Prediction> getTrainTestPredictions(Classifier classifier, Instances train, Instances test) throws java.lang.Exception
classifier - the Classifier to evaluatetrain - the training datasettest - the test datasetjava.lang.Exception - if an error occurspublic java.util.ArrayList<Prediction> getTestPredictions(Classifier classifier, Instances test) throws java.lang.Exception
classifier - the pre-trained Classifier to evaluatetest - the test datasetjava.lang.Exception - if an error occurspublic Prediction getPrediction(Classifier classifier, Instance test) throws java.lang.Exception
classifier - the pre-trained Classifier to evaluatetest - the test instancejava.lang.Exception - if an error occurspublic java.lang.String getRevision()
getRevision in interface RevisionHandler