Package weka.classifiers
Class TestingHelper
- java.lang.Object
-
- weka.classifiers.TestingHelper
-
public class TestingHelper extends Object
Helper class for evaluating models on test data.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTestingHelper.TestingUpdateListenerThe interface for objects that listen for testing updates.
-
Constructor Summary
Constructors Constructor Description TestingHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidevaluateModel(weka.classifiers.Classifier model, weka.core.Instances test, weka.classifiers.Evaluation eval, int interval, TestingHelper.TestingUpdateListener listener)Evaluates the model on the test data and sends updates to the listener (if available).static voidevaluateModel(weka.classifiers.Classifier model, weka.core.Instances test, weka.classifiers.Evaluation eval, int interval, TestingHelper.TestingUpdateListener listener, StoppableWithFeedback owner)Evaluates the model on the test data and sends updates to the listener (if available).
-
-
-
Method Detail
-
evaluateModel
public static void evaluateModel(weka.classifiers.Classifier model, weka.core.Instances test, weka.classifiers.Evaluation eval, int interval, TestingHelper.TestingUpdateListener listener) throws ExceptionEvaluates the model on the test data and sends updates to the listener (if available).- Parameters:
model- the model to testtest- the test dataeval- the evaluation object to useinterval- the update intervallistener- the listener to send the updates to, can be null- Throws:
Exception- if evaluation fails
-
evaluateModel
public static void evaluateModel(weka.classifiers.Classifier model, weka.core.Instances test, weka.classifiers.Evaluation eval, int interval, TestingHelper.TestingUpdateListener listener, StoppableWithFeedback owner) throws ExceptionEvaluates the model on the test data and sends updates to the listener (if available).- Parameters:
model- the model to testtest- the test dataeval- the evaluation object to useinterval- the update intervallistener- the listener to send the updates to, can be nullowner- the owner to check whether stopped, can be null- Throws:
Exception- if evaluation fails
-
-