Skip to main content

linreg-rabia

A simple linear regression model (y = m * x + b) written from scratch with NumPy and gradient descent.

Installation

pip install linreg-rabia

Usage

import numpy as np
from linreg import LinearRegression

x = np.array([1, 2, 3, 4, 5])
y = np.array([3, 5, 7, 9, 11])        # y = 2x + 1

model = LinearRegression(x, y)
model.fit(epochs=5000, lr=0.01)

print(model)                  # LinearRegression(m=2.0000, b=1.0000)
print(model.predict(6))       # about 13.0
print(model.mse())            # close to 0

License

MIT

Metadata

Release files for linreg-rabia 1.0.0

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

Source distribution (sdist)

Source distribution for linreg-rabia 1.0.0
File Size Uploaded Provenance
linreg_rabia-1.0.0.tar.gz 2.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for linreg-rabia 1.0.0
File Interpreter ABI Platform
linreg_rabia-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / linreg_rabia-1.0.0.tar.gz

Download URL linreg_rabia-1.0.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
224cc94787ad77aeeb12d6b4ecebedcda2c154de6afc10ba68e59fc4895b1407
BLAKE2b-256 checksum
How to use checksums
c00340b09af1fbee26e67577fb2509c5f89b393d1be7865add11210caed6efa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / linreg_rabia-1.0.0-py3-none-any.whl

Download URL linreg_rabia-1.0.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfc4f8af9c72a0e2d0f085578be4d3e4733f6669b75c4cd65ad5b530fd3779f3
BLAKE2b-256 checksum
How to use checksums
cd4dfca65cc2de78e6491c88ea66805c25f0d2745a3a2aa6ca8135edd97c1ad6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for linreg-rabia 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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