public class WekaScoringMapTask
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
WekaScoringMapTask() |
| Modifier and Type | Method and Description |
|---|---|
double[][] |
finalizeBatchPrediction()
Finish off the last partial batch (if any).
|
java.lang.String |
getMissingMismatchAttributeInfo()
Get a string summarizing missing and type mismatches between the incoming
data and what the model expects
|
java.util.List<java.lang.String> |
getPredictionLabels()
Get a list of labels that the model can predict
|
boolean |
isBatchPredictor()
Returns true if the underlying model is a BatchPredictor
|
boolean |
modelIsAClassifier()
Returns true if the underlying model is a classifier
|
boolean |
modelIsUsingStringAttributes()
Returns true if model is using string attributes
|
double[] |
processInstance(weka.core.Instance inst)
Process (score) an instance
|
double[][] |
processInstanceBatchPredictor(weka.core.Instance inst)
Process an instance.
|
void |
setModel(java.lang.Object model,
weka.core.Instances modelHeader,
weka.core.Instances dataHeader)
Set the model to use
|
void |
updateModel(java.lang.Object model)
Update the underlying model for this scoring task
|
public void setModel(java.lang.Object model,
weka.core.Instances modelHeader,
weka.core.Instances dataHeader)
throws DistributedWekaException
model - the model to usemodelHeader - the header of the training data used to train the modeldataHeader - the header of the incoming dataDistributedWekaException - if more than 50% of the attributes
expected by the model are missing or have a type mismatch with
the incoming datapublic void updateModel(java.lang.Object model)
throws DistributedWekaException
model - the new model to useDistributedWekaException - if the task has not yet been initialized
by calling setModel().public double[] processInstance(weka.core.Instance inst)
throws DistributedWekaException
inst - the instance to scoreDistributedWekaException - if a problem occurspublic double[][] processInstanceBatchPredictor(weka.core.Instance inst)
throws DistributedWekaException
inst - the instance to processDistributedWekaException - if a problem occurspublic double[][] finalizeBatchPrediction()
throws DistributedWekaException
DistributedWekaException - if a problem occurspublic java.lang.String getMissingMismatchAttributeInfo()
public java.util.List<java.lang.String> getPredictionLabels()
throws DistributedWekaException
DistributedWekaException - if a problem occurspublic boolean isBatchPredictor()
public boolean modelIsUsingStringAttributes()
public boolean modelIsAClassifier()