Skip to main content

A transparent, pure-math implementation of Multiple Linear Regression using the Normal Equation.

Project description

beta_solver

Python License Status

beta_solver is a personal project where I implement Machine Learning algorithms from scratch to understand the mathematics behind the "black box."

I am currently practicing core algorithms, starting with Linear Regression using the Normal Equation. As I learn and practice more algorithms, I will update this library to include them.

🎯 Project Goal

The goal of this project is not to replace libraries like scikit-learn, but to:

  1. Demystify the math behind ML algorithms.
  2. Implement pure Python/Numpy solutions without high-level wrappers.
  3. Document my learning journey in code.

📐 Current Algorithm

Linear Regression

Right now, the library solves for the coefficient vector $\beta$ using Linear Algebra:

$$\beta = (X^T X)^{-1} (X^T Y)$$

Where:

  • $X$: The input feature matrix.
  • $Y$: The target vector.
  • $\beta$: The resulting coefficients (Intercept + Slopes).

Logistic Regression

Logistic Regression is implemented using the Gradient Descent optimization technique to minimize the Log Loss function. The model predicts probabilities using the Sigmoid function: $$P(Y=1|X) = \sigma(X\beta) = \frac{1}{1 + e^{-X\beta}}$$ Where:

  • $X$: The input feature matrix.
  • $Y$: The target vector (0 or 1).
  • $\beta$: The coefficient vector (Intercept + Slopes).

🚀 Installation

You can install beta_solver using pip:

pip install beta_solver

🤝 Contributing

This is a learning repository. If you see a way to optimize the math or make the code cleaner, feel free to open a Pull Request!

📄 License

Distributed under the MIT License. See LICENSE for more information.

👤 Author

Abhish Bondre GitHub: abhishbondre

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

beta_solver-0.0.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beta_solver-0.0.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file beta_solver-0.0.2.tar.gz.

File metadata

  • Download URL: beta_solver-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for beta_solver-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f54812b81875e280d4561a96580319346ff9e5218dd5379789cd6e7c9673d3bb
MD5 c469ddcdd78d4ebbaf1f1bb576e6d9d5
BLAKE2b-256 ee3b79cd29acc9005807e904b6f7f6b15cdf89ada1de50a94fa3573b2a6a6b16

See more details on using hashes here.

File details

Details for the file beta_solver-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: beta_solver-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for beta_solver-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ab7c3033ce5def4c49248147bcca4e56a2b24ae85f6d3e063f3800eba4389ec
MD5 1ed077ff64b2fd01d63c19d7c07f93c4
BLAKE2b-256 349243ed45b72aa4287ad32de0c9aacd944f9ed2b86ed079d39912343738e2a1

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