Piecewise linear regressions, based on model trees.
Project description
Pycewise
Installation
From a wheel (recommended)
pip install pycewise
Optional requirements
The main functionnality of this package (computing a segmented linear regression) can be used without any third-party code.
For additional features, the following packages should be installed (pip install <package_name>
):
- numpy
- statsmodels
- jupyter
- matplotlib
- graphviz
- coverage
- mock
- palettable
Usage
Basic example:
from pycewise import *
import pandas
df = pandas.read_csv('test_data/ringrong_loopback.csv').groupby('size').mean().reset_index()
reg = compute_regression(df['size'], df['duration'], mode='log')
print(reg)
For more advanced usage, see the notebooks.
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
pycewise-0.1.0.tar.gz
(13.0 kB
view hashes)
Built Distribution
pycewise-0.1.0-py3-none-any.whl
(13.1 kB
view hashes)