You could also compile trees, as done in this project:
https://github.com/ajtulloch/sklearn-compiledtrees/

You would need to write a new backend that emits Java instead of C++.
The result will contain both the model and the code to execute it.
This is probably the best approach if you need low-latency predictions.
The disadvantage of this approach is that you're stuck with GBRT.
With the server approach that others mentioned, you can easily switch
models.

If you don't need low-latency at all, you can also write a Python program
that reads data from stdin and writes predictions to stdout.
Then, you can easily call that program from Java.

My 2 cents,
Mathieu


On Tue, Jun 17, 2014 at 12:40 AM, Lars Buitinck <larsm...@gmail.com> wrote:

> 2014-06-16 16:56 GMT+02:00 Joel Nothman <joel.noth...@gmail.com>:
> > There is, at present, no standard way to do this (although PMML has been
> > mooted). It depends entirely on which model class you want to export.
> Which?
>
> Apparently there's a third-party scikit-learn -> PMML adapter package now:
>
> https://support.zementis.com/entries/37092748-Introducing-Py2PMML
>
> I haven't tried it, so I can't say if it's any good.
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to