Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Afterall42 opened this issue Dec 16, 2021 · 1 comment
Closed

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

Afterall42 opened this issue Dec 16, 2021 · 1 comment

Comments

@Afterall42
Copy link

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

@vruusmann
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants