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) |
addResultFeatures, collectResultFeatures, collectSegmentResultFeatures, createInputFields, createInputFields, createMiningSchemaException, createOutputFields, createTargetFields, getActiveFields, getDataField, getDefaultDataField, getInputFields, getLocalDerivedField, getMathContext, getMiningField, getMiningFunction, getModel, getOutputField, getOutputFields, getResultFeatures, getTarget, getTargetField, getTargetFields, getTargetName, getVisibleFields, hasLocalDerivedFields, hasOutputFields, hasResultFeature, resetInputFields, resetResultFields, resolveField, setDefaultDataFieldgetDefineFunction, getDerivedField, getPMML, toImmutableListMap, toImmutableMapMap, toImmutableSetMapclone, 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<String,?> evaluate(Map<String,?> 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 List<InputField> filterInputFields(List<InputField> inputFields)
filterInputFields in class ModelManager<M extends org.dmg.pmml.Model>protected List<TargetField> filterTargetFields(List<TargetField> targetFields)
filterTargetFields in class ModelManager<M extends org.dmg.pmml.Model>protected List<OutputField> filterOutputFields(List<OutputField> outputFields)
filterOutputFields in class ModelManager<M extends org.dmg.pmml.Model>public Map<String,?> evaluateInternal(ModelEvaluationContext context)
protected <V extends Number> Map<String,?> evaluateRegression(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> evaluateClassification(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> evaluateClustering(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> evaluateAssociationRules(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> evaluateSequences(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> evaluateTimeSeries(ValueFactory<V> valueFactory, EvaluationContext context)
protected <V extends Number> Map<String,?> 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 OutputFilter ensureOutputFilter()
protected ValueFactory<?> ensureValueFactory()
public Configuration getConfiguration()
public InputMapper getInputMapper()
public ResultMapper getResultMapper()
Copyright © 2022. All rights reserved.