Hi Sashi,
> I see that 1.5.1 has a MiningModelEvaluator as well as the MiningModel class.
>
The pattern is that for every <Model> element (backed by a PMML class
model object in the JPMML-Model library), there is a corresponding
<Model>Evaluator model evaluator class:
org.dmg.pmml.tree.TreeModel -> org.jpmml.evaluator.tree.TreeModelEvaluator
org.dmg.pmml.mining.MiningModel ->
org.jpmml.evaluator.mining.MiningModelEvaluator
Right now there is one-to-one correspondence. In the near future, the
JPMML-Evaluator library will start providing multiple model evaluator
classes, with the intent of making it possible to provide <Model>
element configuration-specific subclasses. For example, one subclass
for small numeric-only decision tree ensembles and another one for
huge sparse decision tree ensembles.
> Perhaps there are some types of MiningModel that 1.5.1 does not support?
>
Nope. The org.jpmml.evaluator.mining.MiningModelEvaluator class is a
general-purpose model evaluator that should be able to handle any
MiningModel element out there (therefore it's so big and bloated right
now).
> org.jpmml.evaluator.UnsupportedElementException: Element MiningModel is not supported
> at org.jpmml.evaluator.ModelManagerFactory.newModelManager(ModelManagerFactory.java:82)
> at org.jpmml.evaluator.ModelEvaluatorFactory.newModelEvaluator(ModelEvaluatorFactory.java:31)
> at org.jpmml.evaluator.ModelEvaluatorBuilder.build(ModelEvaluatorBuilder.java:107)
>
I suspect there's a class name/type mismatch in your application.
The second argument to the ModelManagerFactory#newModelManager(PMML,
Model) method invocation should be an instance of
org.dmg.pmml.mining.MiningModel:
https://github.com/jpmml/jpmml-evaluator/blob/1.5.1/pmml-evaluator/src/main/java/org/jpmml/evaluator/ModelManagerFactory.java#L56-L83
However, in your case, it's something else. Perhaps your application
is using shading, so that org.dmg.pmml.mining.MiningModel has been
renamed to something else?
The matching in ModelManagerFactory#getServiceProviderClasses(Class)
is class name based, so shading would break it:
https://github.com/jpmml/jpmml-evaluator/blob/1.5.1/pmml-evaluator/src/main/java/org/jpmml/evaluator/ModelManagerFactory.java#L85-L105
What does ModelManagerFactory#getServiceProviderClasses(MiningModel.class)
print out for you?
VR