An open source python library for non-linear piecewise symbolic regression based on Genetic Programming
Project description
PS-Tree
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
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:
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:
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2021-06-28)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pstree-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12552805bae4908596475a1d89f28703bb62f0699a659fd1fb07ce1ac45e2059 |
|
MD5 | 012ac955698b59b8c135b801cb4cc056 |
|
BLAKE2b-256 | be4bc7bd05b8069fe574894634a7936411a6e4a4ab12deb461f59c8f6bc3e805 |