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 details)
Built Distribution
pycewise-0.1.0-py3-none-any.whl
(13.1 kB
view details)
File details
Details for the file pycewise-0.1.0.tar.gz
.
File metadata
- Download URL: pycewise-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266ec9d08c39ed481e71d98f27b9d31d9a1b2e14bd54f844215c69d627869ccd |
|
MD5 | d0244761c0bde0e1499164d260d0be3a |
|
BLAKE2b-256 | daa7ad76134129814755b18da6a79217f86872a16eb9817e31aee291fbb4f953 |
File details
Details for the file pycewise-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pycewise-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54c023d0f8bf9a4ee88f75256d056a8d508195396b972d760b7e7c05ef2778f8 |
|
MD5 | f270c5276e6d3bd690df69658efe2232 |
|
BLAKE2b-256 | 31f37f5fd6bef1727827885e16063be0367801921c925e596e1c00c88841a4ba |