Machine learning regressions methods
Project description
PyRegression
PyRegression is a python library for using in machine learning regressions. The first minimal launched version include nonlinear regression with K-Nearest Neighbor (KNN), Random Forest (RFO) and Support Vector Regression (SVR). Of course, you can use PyRegression for Multiple Linear Regression (MLR) too.
The nonlinear methods include the searching of the best hyperparameters using k-fold cross validation. For more details visit the official documentation in pyregression.gitlab.io
Install
pip install pyregression
or if you prefer (recommended) install in a virtual environment:
python3 -m venv venv-pyregression
cd venv-pyregression
source bin/activate
pip install pyregression
# install dependencies
pip install pandas
pip install sklearn
Example code
# import regression methods
from pyregression.regressors import MLR, KNN, RFO, SVR
# import dataset example
from pyregression.datasets import load_soilmoisture
# load dataset example
X,y = load_soilmoisture()
# do the regressions (test_size = 0.6 by default)
mlr = MLR(X,y)
knn = KNN(X,y)
rfo = RFO(X,y)
svr = SVR(X,y)
# print predicted values
for regression in (mlr, knn, rfo, svr):
print(regression["y_pred"])
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyregression-0.0.8.tar.gz.
File metadata
- Download URL: pyregression-0.0.8.tar.gz
- Upload date:
- Size: 170.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97ac0e513b4b5b03791cbf184a00b52d87b99de106692b6b34ddf8852e5912d1
|
|
| MD5 |
9fc336e180c26a1ed394b8e9096470a4
|
|
| BLAKE2b-256 |
f356f6326b5ba1aca36145b3a35322c870a95bc99e759d3a6f1f6a8e9efbc061
|
File details
Details for the file pyregression-0.0.8-py3-none-any.whl.
File metadata
- Download URL: pyregression-0.0.8-py3-none-any.whl
- Upload date:
- Size: 183.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98464a50e185cc8a8119641507b8742fdf5901e01d393606a2a034eff7d27b58
|
|
| MD5 |
783279176f48ad53bc9a1e6dec71828d
|
|
| BLAKE2b-256 |
c4a7bf6ebc23227fc70112da17a8c7eeb436cfa8ab01270c1f54f0a07f9b5ff8
|