Linear Regression Python Library
Project description
py4linear-regression
Linear Regression Python Library
Getting Started
This project is simply implementation of linear regression algorithm in python programming language.
Prerequisites
Numpy
Installing
The easiest way to install py4linear-regression is using pip
pip install py4linear-regression
Usage
There is 2 public method of Linear Regression class. It is learn and predict method, learn method takes 5 argument namely x_train, t_train, alpha, and epoch. It is the training data, it's label, learning rate, and number of iteration respectively. predict method takes 1 argument namely x_test. It is the data to be predicted
from py4linear_regression.regression import linear_regression
x_train = [[0,0],[0,1],[1,0],[1,1]]
t_train = [0,1,2,3]
classifier = linear_regression()
classifier.learn(x_train,t_train,0.01,250)
x_test = [[0.01,0.99],[0.99,0.01]]
y = classifier.predict(x_test)
Project details
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
File details
Details for the file py4linear_regression-0.0.5.tar.gz
.
File metadata
- Download URL: py4linear_regression-0.0.5.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff520e9a65a81b72c4229ddaba58a7c906279210936aedff7cbc4a239bb2609 |
|
MD5 | 6c7fc4c91805bc25296e5928b956e6f9 |
|
BLAKE2b-256 | d6783eb091d3162dd07c484aabe12728bbcaa63939d4aaddfdea5d21630150e7 |
File details
Details for the file py4linear_regression-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: py4linear_regression-0.0.5-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d25742470cfaf8d0ab489669b7dad2c9dc862769949069d68f9a2e1ee718fd8 |
|
MD5 | fad91af285a3c106b09653e4578bf186 |
|
BLAKE2b-256 | 2dd5b571182498748d68ff4c776c209e9e32f1f10a64259c1be479e6a648719b |