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 interface
TestingHelper.TestingUpdateListener
The 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 void
evaluateModel(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 void
evaluateModel(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 Exception
Evaluates 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 Exception
Evaluates 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
-
-