qwerty
qwerty

Reputation: 11

Integrate PMML to MongoDB

I have build a supervised learning model in R, and exported the model/decision rules in PMML format. I was hoping I could link the PMML straightforwardly to MongoDB using something like the JPMML library (as JPMML integrates well with PostgreSQL).

However, it seems the only way to link MongoDB to my PMML xml file is to use Cascading Pattern through Hadoop. Since my dataset isn't large (<50GB), I don't really need Hadoop.

Has anyone used PMML with MongoDB before that doesn't involve having to go down the hadoop route? Many thanks

Upvotes: 0

Views: 297

Answers (1)

user1808924
user1808924

Reputation: 4926

Basically, you have two options here:

  1. Convert the PMML file to something that you can execute inside MongoDB.
  2. Deploy the PMML file "natively" to some outside service and connect MongoDB to it.

50 GB is still quite a lot of data, so option #1 is clearly preferable in terms of the ease of setup and the speed of execution. Is it possible to write a Java user-defined function (UDF) for MongoDB? If so, then it would be possible to run the JPMML library inside MongoDB. Otherwise, you might see if it would be possible to convert your PMML model to SQL script. For example, the latest versions of KNIME software (2.11.1 and newer) contain a "PMML to SQL" conversion node.

If you fall back to option #2, then the following technical article might provide some inspiration to you: Applying predictive models to database data: the REST web service approach.

Upvotes: 0

Related Questions