==================
PS-Tree
==================
.. image:: https://img.shields.io/pypi/v/pstree.svg
:target: https://pypi.python.org/pypi/pstree
.. image:: https://img.shields.io/travis/hengzhe-zhang/pstree.svg
:target: https://travis-ci.com/hengzhe-zhang/pstree
.. image:: https://readthedocs.org/projects/pstree/badge/?version=latest
:target: https://pstree.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status
An open source python library for non-linear piecewise symbolic regression based on Genetic Programming
* Free software: MIT license
* Documentation: https://pstree.readthedocs.io.
Introduction
----------------
Piece-wise non-linear regression is a long-standing problem in the machine learning domain that has long plagued machine learning researchers. It is extremely difficult for users to determine the correct partition scheme and non-linear model when there is no prior information. To address this issue, we proposed piece-wise non-linear regression tree (PS-Tree), an automated piece-wise non-linear regression method based on decision tree and genetic programming techniques. Based on such an algorithm framework, our method can produce an explainable model with high accuracy in a short period of time.
Installation
----------------
.. code:: bash
pip install -U pstree
Features
----------------
* A fully automated piece-wise non-linear regression tool
* A fast genetic programming based symbolic regression tool
Example
----------------
An example of usage:
.. code:: Python
X, y = load_diabetes(return_X_y=True)
x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
r = PSTreeRegressor(regr_class=GPRegressor, tree_class=DecisionTreeRegressor,
height_limit=6, n_pop=25, n_gen=100,
basic_primitive='optimal', size_objective=True)
r.fit(x_train, y_train)
print(r2_score(y_test, r.predict(x_test)))
Experimental results on SRBench:
.. image:: https://raw.githubusercontent.com/hengzhe-zhang/PS-Tree/master/docs/R2-result.png
Citation
----------------
.. code:: bibtex
@article{zhang2022ps,
title={PS-Tree: A piecewise symbolic regression tree},
author={Zhang, Hengzhe and Zhou, Aimin and Qian, Hong and Zhang, Hu},
journal={Swarm and Evolutionary Computation},
volume={71},
pages={101061},
year={2022},
publisher={Elsevier}
}
* By the way, I would like to express my gratitude to Qi-Hao Huang from Guangzhou University for pointing out that the "minimize" in formula (4) of the paper should be "maximize", corresponding to the code. (https://github.com/hengzhe-zhang/PS-Tree/blob/master/pstree/cluster_gp_sklearn.py#L320-L346)
Credits
--------------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2021-06-28)
------------------
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/hengzhe-zhang/pstree",
"name": "pstree",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "pstree",
"author": "Hengzhe Zhang",
"author_email": "zhenlingcn@foxmail.com",
"download_url": "https://files.pythonhosted.org/packages/b8/43/9a196069b575e59102d9f830dbda8ef87701d5e4679405320b91f31cb3fa/pstree-0.1.2.tar.gz",
"platform": null,
"description": "==================\r\nPS-Tree\r\n==================\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/v/pstree.svg\r\n :target: https://pypi.python.org/pypi/pstree\r\n\r\n.. image:: https://img.shields.io/travis/hengzhe-zhang/pstree.svg\r\n :target: https://travis-ci.com/hengzhe-zhang/pstree\r\n\r\n.. image:: https://readthedocs.org/projects/pstree/badge/?version=latest\r\n :target: https://pstree.readthedocs.io/en/latest/?version=latest\r\n :alt: Documentation Status\r\n\r\n\r\n\r\n\r\nAn open source python library for non-linear piecewise symbolic regression based on Genetic Programming\r\n\r\n\r\n* Free software: MIT license\r\n* Documentation: https://pstree.readthedocs.io.\r\n\r\nIntroduction\r\n----------------\r\nPiece-wise non-linear regression is a long-standing problem in the machine learning domain that has long plagued machine learning researchers. It is extremely difficult for users to determine the correct partition scheme and non-linear model when there is no prior information. To address this issue, we proposed piece-wise non-linear regression tree (PS-Tree), an automated piece-wise non-linear regression method based on decision tree and genetic programming techniques. Based on such an algorithm framework, our method can produce an explainable model with high accuracy in a short period of time.\r\n\r\nInstallation\r\n----------------\r\n\r\n.. code:: bash\r\n\r\n pip install -U pstree\r\n\r\nFeatures\r\n----------------\r\n\r\n* A fully automated piece-wise non-linear regression tool\r\n* A fast genetic programming based symbolic regression tool\r\n\r\nExample\r\n----------------\r\nAn example of usage:\r\n\r\n.. code:: Python\r\n\r\n X, y = load_diabetes(return_X_y=True)\r\n x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\r\n r = PSTreeRegressor(regr_class=GPRegressor, tree_class=DecisionTreeRegressor,\r\n height_limit=6, n_pop=25, n_gen=100,\r\n basic_primitive='optimal', size_objective=True)\r\n r.fit(x_train, y_train)\r\n print(r2_score(y_test, r.predict(x_test)))\r\n\r\nExperimental results on SRBench:\r\n\r\n.. image:: https://raw.githubusercontent.com/hengzhe-zhang/PS-Tree/master/docs/R2-result.png\r\n\r\nCitation\r\n----------------\r\n.. code:: bibtex\r\n\r\n @article{zhang2022ps,\r\n title={PS-Tree: A piecewise symbolic regression tree},\r\n author={Zhang, Hengzhe and Zhou, Aimin and Qian, Hong and Zhang, Hu},\r\n journal={Swarm and Evolutionary Computation},\r\n volume={71},\r\n pages={101061},\r\n year={2022},\r\n publisher={Elsevier}\r\n }\r\n\r\n* By the way, I would like to express my gratitude to Qi-Hao Huang from Guangzhou University for pointing out that the \"minimize\" in formula (4) of the paper should be \"maximize\", corresponding to the code. (https://github.com/hengzhe-zhang/PS-Tree/blob/master/pstree/cluster_gp_sklearn.py#L320-L346)\r\n\r\nCredits\r\n--------------\r\n\r\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\r\n\r\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\r\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\r\n\r\n\r\n=======\r\nHistory\r\n=======\r\n\r\n0.1.0 (2021-06-28)\r\n------------------\r\n\r\n* First release on PyPI.\r\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "An open source python library for non-linear piecewise symbolic regression based on Genetic Programming",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/hengzhe-zhang/pstree"
},
"split_keywords": [
"pstree"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "66ee6dbdd153cbadd241c7944b662b18e4e27be3c337bbdb7842c0fd76a67cdb",
"md5": "e70be35a67e8347a3e62703ed5c9b25c",
"sha256": "a53ce98b0e82dc793c49503b69fe6b560b1b15a932480262a5a4664dae966b89"
},
"downloads": -1,
"filename": "pstree-0.1.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e70be35a67e8347a3e62703ed5c9b25c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 26366,
"upload_time": "2023-12-14T02:35:01",
"upload_time_iso_8601": "2023-12-14T02:35:01.395973Z",
"url": "https://files.pythonhosted.org/packages/66/ee/6dbdd153cbadd241c7944b662b18e4e27be3c337bbdb7842c0fd76a67cdb/pstree-0.1.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b8439a196069b575e59102d9f830dbda8ef87701d5e4679405320b91f31cb3fa",
"md5": "02bd1607087d1702078e7b8602b694fe",
"sha256": "2441283a82c5d05da66b0167f67a3a7fb6c97ceb7e92e70db1593a3faeb40bc8"
},
"downloads": -1,
"filename": "pstree-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "02bd1607087d1702078e7b8602b694fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 101262,
"upload_time": "2023-12-14T02:35:03",
"upload_time_iso_8601": "2023-12-14T02:35:03.169821Z",
"url": "https://files.pythonhosted.org/packages/b8/43/9a196069b575e59102d9f830dbda8ef87701d5e4679405320b91f31cb3fa/pstree-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-14 02:35:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hengzhe-zhang",
"github_project": "pstree",
"github_not_found": true,
"lcname": "pstree"
}