Skip to main content

Generic badge Generic badge

PyLinReg

Linear Regression Model with only Python Standard Library based on Ordinary Least Squares (OLS) Method

Quickstart

Requirements

This module use Python Standard Library only. Python version should be higher than 3.6

Install

pip install pylinreg

How to Use

This code works as module not a script.

Import

import pylinreg

Create linear regression model object

predictors = [1, 2, 3, 4, 5]
targets = [15, 25, 35, 45, 55]
Model = pylinreg.LinearModel(predictors, targets)

Get values of slope and intercept

slope = Model.slope
intercept = Model.intercept

Get prediction

predictor = 6
prediction = Model.make_prediction(predictor)

The prediction is 65.

Help

help(pylinreg)

Examples

Examples are available in the test.py

License

The content of this repository is licensed under MIT license. For more details, check LICENSE

Metadata

Release files for pylinreg 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylinreg 1.0.1
File Size Uploaded
pylinreg-1.0.1.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylinreg 1.0.1
File Interpreter ABI Platform
pylinreg-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / pylinreg-1.0.1.tar.gz

Download URL pylinreg-1.0.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3d567834354bc8ef253865a6d5f63f536d822244b6aab924a89852f0b5bb7e72
BLAKE2b-256 checksum
How to use checksums
d4eecdde9bfc1dd560ad1f94fb27078121c3c4f9996a5be3cdafad665f82e178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.4

Release files / pylinreg-1.0.1-py3-none-any.whl

Download URL pylinreg-1.0.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
870a7161182ad3253fbcc816da623508e8a0bfff9409f380c7f12d2b7df32977
BLAKE2b-256 checksum
How to use checksums
3b0b793d5b9f55b8ab2d028a36613625a082fe70f2eb2e23dbe0a131d51f6d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.4

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page