Bayesian network/inference model support in JPMML evaluator

73 views
Skip to first unread message

Gaurav gupta

unread,
Dec 13, 2017, 3:39:48 PM12/13/17
to Java PMML API, Gaurav Gupta
Hi Villu,
I learnt from https://github.com/jpmml/jpmml-evaluator/blob/master/features.md that Bayesian network/inference model is not there now. I think in PMML 4.3 version they have added support for Bayesian network models.

I also look into r2pmml & sklearn2pmml and similar packages in R and python but I didn't find any way to convert R or python model to Bayesian network model. Is this the reason you have not added support for it in JPMML-evaluator? Do you have these on the Road Map?


Regards
Gaurav

Villu Ruusmann

unread,
Dec 13, 2017, 4:54:53 PM12/13/17
to Java PMML API
Hi Gaurav,

> I think in PMML 4.3 version they have added support
> for Bayesian network models.
>

That's correct, and you can use the JPMML-Model library to
read/modify/write such PMML documents with ease.

The primary driver for the BayesianNetworkModel element appears to be
Hidden Markov Models (HMMs). However, this part of the PMML
specification is still undergoing significant development (happening
at http://mantis.dmg.org), and in the upcoming PMML 4.4 version its
functionality should be expanded.

> I also look into r2pmml & sklearn2pmml and similar
> packages in R and python but I didn't find any way to
> convert R or python model to Bayesian network
> model.

In R there should be many packages for doing HMM modeling work. But
who can tell which package is the most popular, and should be
supported by the r2pmml package first?

There doesn't seem to be anything official in Scikit-Learn at the
moment (see the warning at
http://scikit-learn.sourceforge.net/stable/modules/hmm.html). However,
the pymc3 project (https://github.com/pymc-devs/pymc3) has a child
project pmml_pymcBN (https://github.com/usnistgov/pmml_pymcBN), which
seems to offer basic serialization/deserialization and model execution
functionality.

> Is this the reason you have not added support for it in
> JPMML-evaluator? Do you have these on the Road Map?
>

It would be necessary to build out adequate conversion and scoring
support at the same time. The pmml_pymcBN project addresses the
conversion side to some degree, but I'd like to see more feature
requests to make the case more compelling.

Do you have a use case for Bayesian network models? What would be the
ideal R or Python workflow for training them?


VR
Reply all
Reply to author
Forward
0 new messages