2013/9/23 Fred Baba <[email protected]>:
> Thanks, Olivier. The application involves continuous classification of
> real-time input features. So I only make on prediction at a time. My
> intention would be to observe the structure of the fitted model and then
> optimize the prediction function by hand in c++. For instance, a linear
> classifier would be implemented something like:
>
>     std::vector<std::pair<double,double> > vals;
>     ...
>     double val = 0, z = 0;
>     for (const auto& v : vals)
>         val += v.first * v.second;
>     z = std::copysign(1, val);
>
> The above code computes a 20-feature linear classifier in about 25ns.
>
> I'm not sure if a PMML exporter will be necessary for my current
> application, but if so I'd be happy to contribute it to scikit-learn.

But again, I think the time required to pack the data model into your
std::vector<std::pair<double,double>>  datastructure will dominate
your prediction function.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to