[scikit-learn] Speeding up RF regressors

Ali Zude zude07 at yahoo.com
Thu Aug 11 07:31:24 EDT 2016


Thnx Maciek,
I've tried to use it but I could not sort out the PyPi problem,  see the error below. Thanks in advance.

---> 16 import compiledtrees

/home/ali/anaconda2/lib/python2.7/site-packages/compiledtrees/__init__.py in <module>()
----> 1 from compiledtrees.compiled import CompiledRegressionPredictor
      2 
      3 __all__ = ["CompiledRegressionPredictor"]

/home/ali/anaconda2/lib/python2.7/site-packages/compiledtrees/compiled.py in <module>()
      1 from __future__ import print_function
      2 
----> 3 from sklearn.utils import array2d
      4 from sklearn.tree.tree import DecisionTreeRegressor, DTYPE
      5 from sklearn.ensemble.gradient_boosting import GradientBoostingRegressor

ImportError: cannot import name array2d


Kind regards
Ali

      Von: Maciek Wójcikowski <maciek at wojcikowski.pl>
 An: Ali Zude <zude07 at yahoo.com>; Scikit-learn user and developer mailing list <scikit-learn at python.org> 
 Gesendet: 12:26 Donnerstag, 11.August 2016
 Betreff: Re: [scikit-learn] Speeding up RF regressors
   
Hi Ali,
I'm using sklearn-compiledtrees [https://github.com/ajtulloch/sklearn-compiledtrees] on quite large trees (pickle size ~1GB, compiled ~100MB) and the speedup is gigantic (never measured it properly) but I'd say it's over 10x.
----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
maciek at wojcikowski.pl

2016-08-11 13:21 GMT+02:00 Ali Zude via scikit-learn <scikit-learn at python.org>:

Hi all,
I've 6 RF models and I am using them online to predict 6 different variables (using the same features), models quality (error in test data is good). However, the online prediction is very very slow. 
How can I speed up the prediction?   
   -     Can I import models into C++ code?
   -     Is it useful to upgrade to scikit-learn 0.18? and then use multi-output models?   

   -     Is sklearn-compiledtreesuseful, they are claiming that it will speed the prediction (5x-8x)times?
   
   - I could not use because of array2d error >>PyPi
Thank you for your help 

RegardsAli

______________________________ _________________
scikit-learn mailing list
scikit-learn at python.org
https://mail.python.org/ mailman/listinfo/scikit-learn





  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20160811/b5d9c592/attachment-0001.html>


More information about the scikit-learn mailing list