public abstract class ModelEvaluator<M extends org.dmg.pmml.Model> extends java.lang.Object implements Evaluator, java.io.Serializable
DEFAULT_TARGET_NAME| Modifier | Constructor and Description |
|---|---|
protected |
ModelEvaluator(org.dmg.pmml.PMML pmml,
M model) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<InputField> |
createInputFields() |
protected java.util.List<InputField> |
createInputFields(org.dmg.pmml.MiningField.UsageType usageType) |
protected java.util.List<OutputField> |
createOutputFields() |
protected java.util.List<TargetField> |
createTargetFields() |
java.util.Map<org.dmg.pmml.FieldName,?> |
evaluate(java.util.Map<org.dmg.pmml.FieldName,?> arguments)
Evaluates the model with the specified arguments.
|
abstract java.util.Map<org.dmg.pmml.FieldName,?> |
evaluate(ModelEvaluationContext context) |
java.util.List<InputField> |
getActiveFields()
Gets the independent (ie. input) fields of a
Model from its MiningSchema. |
protected org.dmg.pmml.DataField |
getDataField() |
org.dmg.pmml.DataField |
getDataField(org.dmg.pmml.FieldName name) |
org.dmg.pmml.DefineFunction |
getDefineFunction(java.lang.String name) |
org.dmg.pmml.DerivedField |
getDerivedField(org.dmg.pmml.FieldName name) |
java.util.List<InputField> |
getInputFields() |
org.dmg.pmml.DerivedField |
getLocalDerivedField(org.dmg.pmml.FieldName name) |
org.dmg.pmml.MiningField |
getMiningField(org.dmg.pmml.FieldName name) |
org.dmg.pmml.MiningFunction |
getMiningFunction()
Gets the type of the
Model. |
M |
getModel() |
org.dmg.pmml.OutputField |
getOutputField(org.dmg.pmml.FieldName name) |
java.util.List<OutputField> |
getOutputFields()
Gets the output fields of a
Model from its Output. |
org.dmg.pmml.PMML |
getPMML() |
org.dmg.pmml.Target |
getTarget(org.dmg.pmml.FieldName name) |
TargetField |
getTargetField() |
org.dmg.pmml.FieldName |
getTargetFieldName() |
java.util.List<TargetField> |
getTargetFields()
Gets the dependent (ie. target in supervised training) fields of a
Model from its MiningSchema. |
<V> V |
getValue(com.google.common.cache.Cache<M,V> cache,
java.util.concurrent.Callable<? extends V> loader) |
<V> V |
getValue(com.google.common.cache.LoadingCache<M,V> cache) |
protected org.dmg.pmml.DerivedField |
resolveDerivedField(org.dmg.pmml.FieldName name) |
protected org.dmg.pmml.TypeDefinitionField |
resolveField(org.dmg.pmml.FieldName name) |
protected static <M extends org.dmg.pmml.Model> |
selectModel(org.dmg.pmml.PMML pmml,
java.lang.Class<? extends M> clazz) |
void |
verify()
Verifies the model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSummaryprotected ModelEvaluator(org.dmg.pmml.PMML pmml,
M model)
public abstract java.util.Map<org.dmg.pmml.FieldName,?> evaluate(ModelEvaluationContext context)
public org.dmg.pmml.MiningFunction getMiningFunction()
Evaluator
Gets the type of the Model.
getMiningFunction in interface Evaluatorpublic org.dmg.pmml.DataField getDataField(org.dmg.pmml.FieldName name)
protected org.dmg.pmml.DataField getDataField()
DataField element describing the default target field.public org.dmg.pmml.DerivedField getDerivedField(org.dmg.pmml.FieldName name)
public org.dmg.pmml.DefineFunction getDefineFunction(java.lang.String name)
public org.dmg.pmml.MiningField getMiningField(org.dmg.pmml.FieldName name)
public java.util.List<InputField> getInputFields()
getInputFields in interface HasInputFieldspublic java.util.List<InputField> getActiveFields()
HasActiveFields
Gets the independent (ie. input) fields of a Model from its MiningSchema.
getActiveFields in interface HasActiveFieldspublic org.dmg.pmml.DerivedField getLocalDerivedField(org.dmg.pmml.FieldName name)
public org.dmg.pmml.Target getTarget(org.dmg.pmml.FieldName name)
public java.util.List<TargetField> getTargetFields()
HasResultFields
Gets the dependent (ie. target in supervised training) fields of a Model from its MiningSchema.
getTargetFields in interface HasResultFieldspublic TargetField getTargetField()
public org.dmg.pmml.FieldName getTargetFieldName()
public org.dmg.pmml.OutputField getOutputField(org.dmg.pmml.FieldName name)
public java.util.List<OutputField> getOutputFields()
HasResultFields
Gets the output fields of a Model from its Output.
getOutputFields in interface HasResultFieldspublic void verify()
EvaluatorVerifies the model.
public java.util.Map<org.dmg.pmml.FieldName,?> evaluate(java.util.Map<org.dmg.pmml.FieldName,?> arguments)
EvaluatorEvaluates the model with the specified arguments.
evaluate in interface Evaluatorarguments - Map of input field values.target field and output field values.
A target field could be mapped to a complex value or a simple value.
An output field is always mapped to a simple value.
Complex values are represented as instances of Computable that return simple values.
Simple values are represented using the Java equivalents of PMML data types (eg. String, Integer, Float, Double etc.).
A missing value is represented by null.Computableprotected org.dmg.pmml.TypeDefinitionField resolveField(org.dmg.pmml.FieldName name)
protected org.dmg.pmml.DerivedField resolveDerivedField(org.dmg.pmml.FieldName name)
protected java.util.List<InputField> createInputFields()
protected java.util.List<InputField> createInputFields(org.dmg.pmml.MiningField.UsageType usageType)
protected java.util.List<TargetField> createTargetFields()
protected java.util.List<OutputField> createOutputFields()
public <V> V getValue(com.google.common.cache.LoadingCache<M,V> cache)
public <V> V getValue(com.google.common.cache.Cache<M,V> cache, java.util.concurrent.Callable<? extends V> loader)
public org.dmg.pmml.PMML getPMML()
public M getModel()
protected static <M extends org.dmg.pmml.Model> M selectModel(org.dmg.pmml.PMML pmml,
java.lang.Class<? extends M> clazz)
Copyright © 2017. All Rights Reserved.