public abstract class ModelEvaluator<M extends org.dmg.pmml.Model> extends ModelManager<M> implements Evaluator
ModelEvaluatorBuilder,
Serialized FormDEFAULT_TARGET_NAME| Modifier | Constructor and Description |
|---|---|
protected |
ModelEvaluator() |
protected |
ModelEvaluator(org.dmg.pmml.PMML pmml,
M model) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
assessParentCompatibility() |
protected boolean |
assessPurity() |
void |
configure(Configuration configuration)
Configures the runtime behaviour of this model evaluator.
|
protected <V extends Number> |
createClassification(ValueMap<Object,V> values) |
ModelEvaluationContext |
createEvaluationContext() |
protected List<InputField> |
createInputFields() |
protected List<InputField> |
createInputFields(org.dmg.pmml.MiningField.UsageType usageType) |
protected List<OutputField> |
createOutputFields() |
protected List<TargetField> |
createTargetFields() |
protected Configuration |
ensureConfiguration() |
protected ModelEvaluatorFactory |
ensureModelEvaluatorFactory() |
protected Predicate<org.dmg.pmml.OutputField> |
ensureOutputFilter() |
protected ValueFactory<?> |
ensureValueFactory() |
protected ValueFactoryFactory |
ensureValueFactoryFactory() |
Map<org.dmg.pmml.FieldName,?> |
evaluate(Map<org.dmg.pmml.FieldName,?> arguments)
Evaluates the model with the specified arguments.
|
protected <V extends Number> |
evaluateAssociationRules(ValueFactory<V> valueFactory,
EvaluationContext context) |
protected <V extends Number> |
evaluateClassification(ValueFactory<V> valueFactory,
EvaluationContext context) |
protected <V extends Number> |
evaluateClustering(ValueFactory<V> valueFactory,
EvaluationContext context) |
Map<org.dmg.pmml.FieldName,?> |
evaluateInternal(ModelEvaluationContext context) |
protected <V extends Number> |
evaluateMixed(ValueFactory<V> valueFactory,
EvaluationContext context) |
protected <V extends Number> |
evaluateRegression(ValueFactory<V> valueFactory,
EvaluationContext context) |
protected <V extends Number> |
evaluateSequences(ValueFactory<V> valueFactory,
EvaluationContext context) |
protected <V extends Number> |
evaluateTimeSeries(ValueFactory<V> valueFactory,
EvaluationContext context) |
Configuration |
getConfiguration() |
InputMapper |
getInputMapper() |
protected int |
getNumberOfVisibleFields() |
ResultMapper |
getResultMapper() |
boolean |
isParentCompatible()
Indicates if this model evaluator is compatible with its parent model evaluator.
|
boolean |
isPure()
Indicates if this model evaluator represents a pure function.
|
protected Map<org.dmg.pmml.FieldName,?> |
processArguments(Map<org.dmg.pmml.FieldName,?> arguments) |
protected Map<org.dmg.pmml.FieldName,?> |
processResults(Map<org.dmg.pmml.FieldName,?> results) |
ModelEvaluator<M> |
verify()
Verifies the model.
|
addResultFeatures, createMiningSchemaException, getActiveFields, getDataField, getDefaultDataField, getDefineFunction, getDerivedField, getInputFields, getLocalDerivedField, getMathContext, getMiningField, getMiningFunction, getModel, getOutputField, getOutputFields, getPMML, getResultFeatures, getTarget, getTargetField, getTargetFields, getTargetName, getValue, getValue, getVisibleFields, hasLocalDerivedFields, hasOutputFields, hasResultFeature, resetInputFields, resetResultFields, resolveField, setDefaultDataFieldclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMiningFunction, getSummarygetInputFieldsgetActiveFieldsgetOutputFields, getTargetFieldsprotected ModelEvaluator()
protected ModelEvaluator(org.dmg.pmml.PMML pmml,
M model)
public void configure(Configuration configuration)
Configures the runtime behaviour of this model evaluator.
Must be called once before the first evaluation. May be called any number of times between subsequent evaluations.
public boolean isParentCompatible()
Indicates if this model evaluator is compatible with its parent model evaluator.
A parent compatible model evaluator inherits DataField declarations unchanged,
which makes it possible to propagate DataField and global DerivedField values between evaluation contexts during evaluation.
public boolean isPure()
Indicates if this model evaluator represents a pure function.
A pure model evaluator does not tamper with the evaluation context during evaluation.
protected int getNumberOfVisibleFields()
public ModelEvaluator<M> verify()
EvaluatorVerifies the model.
public ModelEvaluationContext createEvaluationContext()
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 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 Map<org.dmg.pmml.FieldName,?> processArguments(Map<org.dmg.pmml.FieldName,?> arguments)
protected Map<org.dmg.pmml.FieldName,?> processResults(Map<org.dmg.pmml.FieldName,?> results)
protected List<InputField> createInputFields()
createInputFields in class ModelManager<M extends org.dmg.pmml.Model>protected List<InputField> createInputFields(org.dmg.pmml.MiningField.UsageType usageType)
createInputFields in class ModelManager<M extends org.dmg.pmml.Model>protected List<TargetField> createTargetFields()
createTargetFields in class ModelManager<M extends org.dmg.pmml.Model>protected List<OutputField> createOutputFields()
createOutputFields in class ModelManager<M extends org.dmg.pmml.Model>public Map<org.dmg.pmml.FieldName,?> evaluateInternal(ModelEvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateRegression(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateClassification(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateClustering(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateAssociationRules(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateSequences(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateTimeSeries(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<org.dmg.pmml.FieldName,?> evaluateMixed(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Classification<Object,V> createClassification(ValueMap<Object,V> values)
protected boolean assessParentCompatibility()
protected boolean assessPurity()
protected Configuration ensureConfiguration()
protected ModelEvaluatorFactory ensureModelEvaluatorFactory()
protected ValueFactoryFactory ensureValueFactoryFactory()
protected Predicate<org.dmg.pmml.OutputField> ensureOutputFilter()
protected ValueFactory<?> ensureValueFactory()
public Configuration getConfiguration()
public InputMapper getInputMapper()
public ResultMapper getResultMapper()
Copyright © 2020. All rights reserved.