jpmml/jpmml-evaluator-spark

Can I use Scala to load PMML model to complete prediction?

Closed this issue · 1 comments

I built and saved the PMML model with Python, but I didn't know how to invoke it in scala and load it.

If possible, what functions should be used to read and call the PMML model

For example, I can use it in scala

val model = PipelineModel. load(”loadpath“)

Then use

model. transform(data)

To load the model

How do I write code if I want to load the PMML model

In readme It seems that the code in MD can only run in Java

How do I write code if I want to load the PMML model

See https://github.com/jpmml/jpmml-evaluator-spark#usage

In readme It seems that the code in MD can only run in Java

Scala is a subset of Java, right? You can use all JPMML-Evaluator-Spark APIs from Scala, simply replace type declarations with "var" or "val", and that's it.