Skip to main content

Simple Linear Regression from scratch

Project description

linear_regression_ayoub

A simple linear regression model built from scratch in Python.

Usage

from linear_regression_ayoub import SimpleLinearRegression

X = [1, 2, 3, 4, 5]
y = [2, 4, 5, 4, 5]

model = SimpleLinearRegression()
model.fit(X, y)
print("Slope:", model.m)
print("Intercept:", model.c)
print("R²:", model.score(X, y))

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

linear_regression_ayoub_lab3-1.0.0.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file linear_regression_ayoub_lab3-1.0.0.tar.gz.

File metadata

File hashes

Hashes for linear_regression_ayoub_lab3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 69686229ba334fe6fb6db0b1357d1ff7edbb89e6bec486555a15f9ccfbd8195d
MD5 a9e211d13f4e2a90a29d2f91495d116b
BLAKE2b-256 3702d5eb45417d20dff55f35cbeb9e21e0276d01ebcad9c27d1ef6f019993beb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page