Package org.jpmml.evaluator
Class ModelEvaluator<M extends org.dmg.pmml.Model>
- java.lang.Object
-
- org.jpmml.evaluator.PMMLManager
-
- org.jpmml.evaluator.ModelManager<M>
-
- org.jpmml.evaluator.ModelEvaluator<M>
-
- All Implemented Interfaces:
Serializable,Evaluator,HasInputFields,HasModel<M>,HasPMML,HasResultFields
- Direct Known Subclasses:
AssociationModelEvaluator,ClusteringModelEvaluator,GeneralRegressionModelEvaluator,JavaModelEvaluator,MiningModelEvaluator,NaiveBayesModelEvaluator,NearestNeighborModelEvaluator,NeuralNetworkEvaluator,RegressionModelEvaluator,RuleSetModelEvaluator,ScorecardEvaluator,SupportVectorMachineModelEvaluator,TimeSeriesModelEvaluator,TreeModelEvaluator
public abstract class ModelEvaluator<M extends org.dmg.pmml.Model> extends ModelManager<M> implements Evaluator
- See Also:
ModelEvaluatorBuilder, Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jpmml.evaluator.Evaluator
DEFAULT_TARGET_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)Configures the runtime behaviour of this model evaluator.ModelEvaluationContextcreateEvaluationContext()Map<String,?>evaluate(Map<String,?> arguments)Evaluates the model with the specified arguments.Map<String,?>evaluateInternal(ModelEvaluationContext context)ConfigurationgetConfiguration()booleanisParentCompatible()Indicates if this model evaluator is compatible with its parent model evaluator.booleanisPure()Indicates if this model evaluator represents a pure function.ModelEvaluator<M>verify()Verifies the model.-
Methods inherited from class org.jpmml.evaluator.ModelManager
addResultFeatures, getActiveFields, getDataField, getDefaultDataField, getInputFields, getLocalDerivedField, getMathContext, getMiningField, getMiningFunction, getModel, getOutputField, getOutputFields, getResidualFields, getSupplementaryFields, getTarget, getTargetField, getTargetFields, getTargetName, hasResultFeature, setDefaultDataField
-
Methods inherited from class org.jpmml.evaluator.PMMLManager
getDefineFunction, getDerivedField, getPMML
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jpmml.evaluator.Evaluator
getMiningFunction, getSummary
-
Methods inherited from interface org.jpmml.evaluator.HasInputFields
getActiveFields, getInputFields, getResidualFields, getSupplementaryFields
-
Methods inherited from interface org.jpmml.evaluator.HasResultFields
getOutputFields, getTargetFields
-
-
-
-
Method Detail
-
configure
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.
-
isParentCompatible
public boolean isParentCompatible()
Indicates if this model evaluator is compatible with its parent model evaluator.
A parent compatible model evaluator inherits
DataFielddeclarations unchanged, which makes it possible to propagateDataFieldand globalDerivedFieldvalues between evaluation contexts during evaluation.
-
isPure
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.
-
verify
public ModelEvaluator<M> verify()
Description copied from interface:EvaluatorVerifies the model.
-
createEvaluationContext
public ModelEvaluationContext createEvaluationContext()
-
evaluate
public Map<String,?> evaluate(Map<String,?> arguments)
Description copied from interface:EvaluatorEvaluates the model with the specified arguments.
- Specified by:
evaluatein interfaceEvaluator- Parameters:
arguments- Map ofinput fieldvalues.- Returns:
- Map of
target fieldandoutput fieldvalues. 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 ofComputablethat 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 bynull. - See Also:
Computable
-
evaluateInternal
public Map<String,?> evaluateInternal(ModelEvaluationContext context)
-
getConfiguration
public Configuration getConfiguration()
-
-