A simple linear regression model built from scratch in Python.
Project description
simpleLinRegAbh
A simple linear regression model built from scratch using pure Python.
Usage
from simpleLinRegAbh import SimpleLinearRegression
X = [1, 2, 3, 4, 5]
y = [2, 4, 5, 4, 5]
model = SimpleLinearRegression()
model.fit(X, y)
print("Slope:", model.b1)
print("Intercept:", model.b0)
print("Predictions:", model.predict([6, 7]))
print("R² score:", model.score(X, y))
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
simplelinregabh-1.0.1.tar.gz
(1.9 kB
view details)
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 simplelinregabh-1.0.1.tar.gz.
File metadata
- Download URL: simplelinregabh-1.0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a5f23c78dab393c0644648d4e474e3d31815093a4b45896228390959e538cb7
|
|
| MD5 |
42e818c3c55caeaff7f4d5e38a8de278
|
|
| BLAKE2b-256 |
08cde3a10fc8fa136463a07ca7e28abcffc3eda7870bef2f42eef901a0063cd3
|
File details
Details for the file simplelinregabh-1.0.1-py3-none-any.whl.
File metadata
- Download URL: simplelinregabh-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
663a77b864eacd46165623c4f3f9e2c2fd2ad28a0d23cc7e7382a2059caab2e2
|
|
| MD5 |
96a7b703c8cb9c5da6aeffbc117beadc
|
|
| BLAKE2b-256 |
1def6d16078819acd2a8e0aab7ec4b411be615d031e83bfe7d3ede7349643864
|