public class WekaClassifierEvaluationMapTask
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
WekaClassifierEvaluationMapTask() |
Modifier and Type | Method and Description |
---|---|
void |
finalizeTask()
Finalize this task.
|
boolean |
getBatchTrainedIncremental()
Get whether the classifier is an incremental one that has been batch
trained
|
weka.classifiers.Classifier |
getClassifier()
Get the classifier used
|
weka.classifiers.evaluation.Evaluation |
getEvaluation()
Get the evaluation object
|
int |
getFoldNumber()
Get the fold number to evaluate on
|
int |
getTotalNumFolds()
Get the total number of folds
|
static void |
main(java.lang.String[] args) |
void |
processInstance(weka.core.Instance inst)
Process an instance for evaluation
|
void |
setBatchTrainedIncremental(boolean b)
Set whether the classifier is an incremental one that has been batch
trained
|
void |
setClassifier(weka.classifiers.Classifier c)
Set the classifier to use
|
void |
setFoldNumber(int fn)
Set the fold number to evaluate on.
|
void |
setTotalNumFolds(int t)
Set the total number of folds (1 for evaluating on all the data)
|
void |
setup(weka.core.Instances trainingHeader,
double[] priors,
double count,
long seed,
double predFrac)
Setup the task.
|
public weka.classifiers.evaluation.Evaluation getEvaluation()
public void setClassifier(weka.classifiers.Classifier c)
c
- the classifier to usepublic weka.classifiers.Classifier getClassifier()
public void setFoldNumber(int fn)
fn
- the fold number to evaluate on or -1 to evaluate on all the datapublic int getFoldNumber()
public void setTotalNumFolds(int t)
t
- the total number of foldspublic int getTotalNumFolds()
public void setBatchTrainedIncremental(boolean b)
b
- true if the classifier is incremental and it has been batch
trained.public boolean getBatchTrainedIncremental()
public void setup(weka.core.Instances trainingHeader, double[] priors, double count, long seed, double predFrac) throws java.lang.Exception
trainingHeader
- the header of the training data used to create the
classifier to be evaluatedpriors
- priors for the class (frequency counts for the values of a
nominal class or sum of target for a numeric class)count
- the total number of class values seen (with respect to the
priors)seed
- the random seed to use for shuffling the data in the batch casepredFrac
- the fraction of the total number of predictions to retain
for computing AUC/AUPRCjava.lang.Exception
- if a problem occurspublic void processInstance(weka.core.Instance inst) throws java.lang.Exception
inst
- the instance to processjava.lang.Exception
- if a problem occurspublic void finalizeTask() throws java.lang.Exception
java.lang.Exception
- if a problem occurspublic static void main(java.lang.String[] args)