public abstract class ModelEvaluator<M extends org.dmg.pmml.Model> extends ModelManager<M> implements Evaluator
| Constructor and Description |
|---|
ModelEvaluator(org.dmg.pmml.PMML pmml,
Class<? extends M> clazz) |
ModelEvaluator(org.dmg.pmml.PMML pmml,
M model) |
| Modifier and Type | Method and Description |
|---|---|
ModelEvaluationContext |
createContext(ModelEvaluationContext parent) |
Map<org.dmg.pmml.FieldName,?> |
evaluate(Map<org.dmg.pmml.FieldName,?> arguments)
Evaluates the model with the specified arguments.
|
abstract Map<org.dmg.pmml.FieldName,?> |
evaluate(ModelEvaluationContext context) |
protected org.dmg.pmml.DataField |
getDataField() |
org.dmg.pmml.DataField |
getDataField(org.dmg.pmml.FieldName name)
Gets the definition of a field from the
DataDictionary. |
<V> V |
getValue(Callable<? extends V> loader,
com.google.common.cache.Cache<M,V> cache) |
<V> V |
getValue(com.google.common.cache.LoadingCache<M,V> cache) |
FieldValue |
prepare(org.dmg.pmml.FieldName name,
Object value)
Prepares the input value for a field.
|
void |
verify()
Verifies the model.
|
getActiveFields, getGroupFields, getLocalDerivedField, getMiningField, getMiningFields, getMiningFunction, getModel, getOrderFields, getOutputField, getOutputFields, getSummary, getTarget, getTargetField, getTargetFields, resolveDerivedFieldgetDerivedField, getFunction, getPMMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetActiveFields, getGroupFields, getMiningField, getMiningFunction, getOrderFields, getOutputField, getOutputFields, getSummary, getTarget, getTargetField, getTargetFieldspublic ModelEvaluator(org.dmg.pmml.PMML pmml,
M model)
public abstract Map<org.dmg.pmml.FieldName,?> evaluate(ModelEvaluationContext context)
public org.dmg.pmml.DataField getDataField(org.dmg.pmml.FieldName name)
ConsumerDataDictionary.getDataField in interface ConsumergetDataField in class PMMLManagername - The name of the field. The name of the default target field is null.protected org.dmg.pmml.DataField getDataField()
DataField describing the default target field.public FieldValue prepare(org.dmg.pmml.FieldName name, Object value)
EvaluatorPrepares the input value for a field.
First, the value is converted from the user-supplied representation to internal representation. After that, the value is subjected to missing value treatment, invalid value treatment and outlier treatment.
prepare in interface Evaluatorname - The name of the fieldConsumer.getDataField(FieldName),
Consumer.getMiningField(FieldName)public void verify()
EvaluatorVerifies the model.
public ModelEvaluationContext createContext(ModelEvaluationContext parent)
public Map<org.dmg.pmml.FieldName,?> evaluate(Map<org.dmg.pmml.FieldName,?> arguments)
EvaluatorEvaluates the model with the specified arguments.
evaluate in interface Evaluatorarguments - Map of active field values.target field and output field values.
Simple values are represented using the Java equivalents of PMML data types (eg. String, Integer, Float, Double etc.).
Complex values are represented as instances of Computable that return simple values.
A missing result is represented by null.Computablepublic <V> V getValue(com.google.common.cache.LoadingCache<M,V> cache)
Copyright © 2015. All Rights Reserved.