{ "info": { "author": "Andrew Tulloch", "author_email": "andrew@tullo.ch", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: C", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": "Scikit-Learn Compiled Trees\n===========================\n\n|Build Status| \n|PyPI|\n\nInstallation\n------------\n\nReleased under the MIT License.\n\n.. code:: bash\n\n pip install sklearn-compiledtrees\n\nRationale\n---------\n\nIn some use cases, predicting given a model is in the hot-path, so\nspeeding up decision tree evaluation is very useful.\n\nAn effective way of speeding up evaluation of decision trees can be to\ngenerate code representing the evaluation of the tree, compile that to\noptimized object code, and dynamically load that file via dlopen/dlsym\nor equivalent.\n\nSee\nhttps://courses.cs.washington.edu/courses/cse501/10au/compile-machlearn.pdf\nfor a detailed discussion, and\nhttp://tullo.ch/articles/decision-tree-evaluation/ for a more\npedagogical explanation and more benchmarks in C++.\n\nThis package implements compiled decision tree evaluation for the simple\ncase of a single-output regression tree or ensemble.\n\nIt has been tested to work on both OS X and Linux. We do not currently\nsupport Windows platforms for compiled evaluation, although this should\nnot be a signficant amount of work.\n\nUsage\n-----\n\n.. code:: python\n\n import compiledtrees\n import sklearn.ensemble\n\n X_train, y_train, X_test, y_test = ...\n\n clf = ensemble.GradientBoostingRegressor()\n clf.fit(X_train, y_train)\n\n compiled_predictor = compiledtrees.CompiledRegressionPredictor(clf)\n predictions = compiled_predictor.predict(X_test)\n\nBenchmarks\n----------\n\nFor random forests, we see 5x to 8x speedup in evaluation. For gradient\nboosted ensembles, it's between a 1.5x and 3x speedup in evaluation.\nThis is due to the fact that gradient boosted trees already have an\noptimized prediction implementation.\n\nThere is a benchmark script attached that allows us to examine the\nperformance of evaluation across a range of ensemble configurations and\ndatasets.\n\nIn the graphs attached, ``GB`` is Gradient Boosted, ``RF`` is Random\nForest, ``D1``, etc correspond to setting ``max-depth=1``, and ``B10``\ncorresponds to setting ``max_leaf_nodes=10``.\n\nGraphs\n------\n\n.. code:: bash\n\n for dataset in friedman1 friedman2 friedman3 uniform hastie; do\n python ../benchmarks/bench_compiled_tree.py \\\n --iterations=10 \\\n --num_examples=1000 \\\n --num_features=50 \\\n --dataset=$dataset \\\n --max_estimators=300 \\\n --num_estimator_values=6\n done\n\n|timings3907426606273805268| |timings-1162001441413946416|\n|timings5617004024503483042| |timings2681645894201472305|\n|timings2070620222460516071|\n\n.. |Build Status| image:: https://travis-ci.org/ajtulloch/sklearn-compiledtrees.png?branch=master\n :target: https://travis-ci.org/ajtulloch/sklearn-compiledtrees\n \n.. |PyPI| image:: https://badge.fury.io/py/sklearn-compiledtrees.png\n :target: http://badge.fury.io/py/sklearn-compiledtrees\n\n.. |timings3907426606273805268| image:: https://f.cloud.github.com/assets/1121581/2453407/c70a64bc-aedd-11e3-94c7-519411ae6276.png\n :width: 500px\n.. |timings-1162001441413946416| image:: https://f.cloud.github.com/assets/1121581/2453409/c70ad4ec-aedd-11e3-972d-07a49a6bc610.png\n :width: 500px\n.. |timings5617004024503483042| image:: https://f.cloud.github.com/assets/1121581/2453410/c70b48dc-aedd-11e3-9c68-ec3f9d4672b8.png\n :width: 500px\n.. |timings2681645894201472305| image:: https://f.cloud.github.com/assets/1121581/2453411/c70b4de6-aedd-11e3-86bd-d534b0ad0618.png\n :width: 500px\n.. |timings2070620222460516071| image:: https://f.cloud.github.com/assets/1121581/2453408/c70aa594-aedd-11e3-8b14-1a26eb1f3eba.png\n :width: 500px", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ajtulloch/sklearn-compiledtrees", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "sklearn-compiledtrees", "package_url": "https://pypi.org/project/sklearn-compiledtrees/", "platform": "Any", "project_url": "https://pypi.org/project/sklearn-compiledtrees/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ajtulloch/sklearn-compiledtrees" }, "release_url": "https://pypi.org/project/sklearn-compiledtrees/1.2/", "requires_dist": null, "requires_python": null, "summary": "Compiled scikit-learn decision trees for faster evaluation", "version": "1.2" }, "last_serial": 1051462, "releases": { "1.0": [], "1.0.1": [], "1.0.2": [], "1.0.3": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "6850b96e0042d9648fdf83c4178848d9", "sha256": "4c55e72c56cc4e66a4f87c7b2e0384e4ab37b0c0fe031d146bee8e96ef37b8d8" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.3.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "6850b96e0042d9648fdf83c4178848d9", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9098, "upload_time": "2014-03-28T03:42:47", "url": "https://files.pythonhosted.org/packages/59/ea/69c823474711a10329eb491324b383272823c79549127be7bd03604a97c5/sklearn-compiledtrees-1.0.3.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "1b9358916a02ac117e4308dc2e524c26", "sha256": "3e23c7ab1b7f9afd55b46db5afdc2d47fa037be40e5292ea80fd76cc465c9cc7" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1b9358916a02ac117e4308dc2e524c26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5729, "upload_time": "2014-03-28T03:42:43", "url": "https://files.pythonhosted.org/packages/d3/74/d7092c02e94657edd225931effa4bd7e98b4855b3a960442dc775671d1c2/sklearn-compiledtrees-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "4b27cb08e1949de3d4cd12b6249afcce", "sha256": "818072d5eb2a3f72ef744cfe96c21a7d00021559d7903d2fb2c5dc79fe1637b0" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.4.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "4b27cb08e1949de3d4cd12b6249afcce", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 29882, "upload_time": "2014-03-28T03:49:50", "url": "https://files.pythonhosted.org/packages/56/2e/e0b0d2ac33f0898d0ab8a56a514b0543f8cc367a60fff6681c6470867d07/sklearn-compiledtrees-1.0.4.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "0e2bcd93aee78d1135152fb7d81b6d0c", "sha256": "0c009bba16d1a353db97bf46124bd604e265f061b494303383af9ee4f7057727" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.4.tar.gz", "has_sig": false, "md5_digest": "0e2bcd93aee78d1135152fb7d81b6d0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43441, "upload_time": "2014-03-28T03:49:48", "url": "https://files.pythonhosted.org/packages/cc/d7/0211ded9907c0365ee09ef1994da411f2fa7fbab57fd0f04641197704e11/sklearn-compiledtrees-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "570ff9c491a24a78a844eb9f7c3a0343", "sha256": "cd58a0185f93627c1dcc5b33c36bb5a44384e34fa81d3d3d9dac1e15d909b4b4" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.5.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "570ff9c491a24a78a844eb9f7c3a0343", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 29889, "upload_time": "2014-03-28T03:52:31", "url": "https://files.pythonhosted.org/packages/29/33/d9b5d6f6b8a11c091fd6c875059b394bc8aa1cd33275af09e58b1c70f484/sklearn-compiledtrees-1.0.5.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "b9ac93ba63eae386ad9090090c3d470e", "sha256": "32fbc52bdfb5d9de421104b650f711dfc59fe766e23862183b26a86551a2b18a" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b9ac93ba63eae386ad9090090c3d470e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46347, "upload_time": "2014-03-28T03:52:29", "url": "https://files.pythonhosted.org/packages/31/96/41fa54e7f85a6fe86168292242469f43f462f1ce2ff3d8ef66d87b5d3d80/sklearn-compiledtrees-1.0.5.tar.gz" } ], "1.1": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "56396ce47ce9c72f4e08f7a433962961", "sha256": "cf931295df6e252550ac8d15982ef23b061feb1375f3d893fd5804c9cc700b1d" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.1.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "56396ce47ce9c72f4e08f7a433962961", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 29900, "upload_time": "2014-03-28T05:09:41", "url": "https://files.pythonhosted.org/packages/e4/66/ca0d09094feff878582c7ba03d34964b1c05ae2af82d00ad5f15819399c6/sklearn-compiledtrees-1.1.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "ccb8f91d131264c08f8e1f2892cd47a7", "sha256": "40f2a728ffc794c30a0d26d5503839740f3a5a71a9a89a61ab10b11d51abc6ac" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.1.tar.gz", "has_sig": false, "md5_digest": "ccb8f91d131264c08f8e1f2892cd47a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46362, "upload_time": "2014-03-28T05:09:39", "url": "https://files.pythonhosted.org/packages/d1/0f/6592dd6bed214f2e3aa89051e155faa5b8e1ed02ba422d5e902ec34995eb/sklearn-compiledtrees-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "6a6020c14979cb512ae359b5b531cdd9", "sha256": "50f953f1045ac7c178784a37253ceaaa3d4e708f2bf5ee554e96e20283ec3ac1" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.1.1.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "6a6020c14979cb512ae359b5b531cdd9", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 29994, "upload_time": "2014-04-01T21:19:24", "url": "https://files.pythonhosted.org/packages/d3/db/26eaf5655759a10611e00d1d554f233e553937826133ab7ecf06079ed38d/sklearn-compiledtrees-1.1.1.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "20a20adf352ac4af7835f2735b0bee08", "sha256": "9060dd4f7c143ecce0a2372d340aef0983275287686b04d0b00dfb7cb0f451e2" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.1.1.tar.gz", "has_sig": false, "md5_digest": "20a20adf352ac4af7835f2735b0bee08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46469, "upload_time": "2014-04-01T21:19:22", "url": "https://files.pythonhosted.org/packages/9f/71/7f2cca81984dec516581c38fd6059d074aa55a8602fbeadde82b55da820e/sklearn-compiledtrees-1.1.1.tar.gz" } ], "1.2": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "97bf7bc5653173a18eb7ff3cdde576f8", "sha256": "a09a478e46f616f125f8d12cd3c85524df1727bbfee1dd6a6e95b87941f4d06f" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.2.macosx-10.9-x86_64.tar.gz", "has_sig": false, "md5_digest": "97bf7bc5653173a18eb7ff3cdde576f8", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 30090, "upload_time": "2014-04-04T15:40:14", "url": "https://files.pythonhosted.org/packages/40/71/777580818558cbccac4394890ee785b20011aa1915373b48e948dd81022c/sklearn-compiledtrees-1.2.macosx-10.9-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "bb0bb670505d51dd3227c3e329196d32", "sha256": "c35d02bd2963ac3c78da5a8c4d8e17fb59630f4301fbd7f3d8fd88054b5d0f5e" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.2.tar.gz", "has_sig": false, "md5_digest": "bb0bb670505d51dd3227c3e329196d32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46706, "upload_time": "2014-04-04T15:40:11", "url": "https://files.pythonhosted.org/packages/fa/18/a473b0d5bdd7d2fc015fc6a121a17a91d2b97f1ff39b308bbb128a8e6921/sklearn-compiledtrees-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "built for Darwin-13.1.0", "digests": { "md5": "97bf7bc5653173a18eb7ff3cdde576f8", "sha256": "a09a478e46f616f125f8d12cd3c85524df1727bbfee1dd6a6e95b87941f4d06f" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.2.macosx-10.9-x86_64.tar.gz", "has_sig": false, "md5_digest": "97bf7bc5653173a18eb7ff3cdde576f8", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 30090, "upload_time": "2014-04-04T15:40:14", "url": "https://files.pythonhosted.org/packages/40/71/777580818558cbccac4394890ee785b20011aa1915373b48e948dd81022c/sklearn-compiledtrees-1.2.macosx-10.9-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "bb0bb670505d51dd3227c3e329196d32", "sha256": "c35d02bd2963ac3c78da5a8c4d8e17fb59630f4301fbd7f3d8fd88054b5d0f5e" }, "downloads": -1, "filename": "sklearn-compiledtrees-1.2.tar.gz", "has_sig": false, "md5_digest": "bb0bb670505d51dd3227c3e329196d32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46706, "upload_time": "2014-04-04T15:40:11", "url": "https://files.pythonhosted.org/packages/fa/18/a473b0d5bdd7d2fc015fc6a121a17a91d2b97f1ff39b308bbb128a8e6921/sklearn-compiledtrees-1.2.tar.gz" } ] }