Skip to main content

Bhagya My ML Package

A lightweight Machine Learning package built from scratch in Python for educational purposes and algorithm understanding.

This package implements core Machine Learning algorithms without relying on scikit-learn model implementations, making it useful for students who want to learn how ML algorithms work internally.

Features

Linear Models

  • Linear Regression
  • Intercept and coefficient calculation
  • Prediction using Normal Equation and Pseudoinverse

Nearest Neighbors

  • KNN Classifier
  • KNN Regressor
  • Euclidean Distance based similarity

Neural Networks

  • Feed Forward Neural Network
  • Backpropagation Learning
  • Sigmoid Activation Function
  • Hebbian Learning Network

Dimensionality Reduction

  • Principal Component Analysis (PCA)

Preprocessing

  • StandardScaler
  • Feature Standardization

Model Selection

  • Train-Test Split

Metrics

Regression Metrics

  • R² Score
  • Adjusted R² Score
  • Mean Squared Error (MSE)
  • Mean Absolute Error (MAE)
  • Root Mean Squared Error (RMSE)

Classification Metrics

  • Accuracy Score

Installation

pip install bhagya-my-ml-package

Example Usage

Linear Regression

from my_ml_package.linear_models import LinearRegression

model = LinearRegression()

model.fit(X_train, y_train)

predictions = model.predict(X_test)

print(model.intercept_)
print(model.coef_)

KNN Regression

from my_ml_package.neighbors import KNNRegressor

model = KNNRegressor(k=3)

model.fit(X_train, y_train)

predictions = model.predict(X_test)

PCA

from my_ml_package.decomposition import PCA

pca = PCA(n_components=2)

X_reduced = pca.fit_transform(X)

StandardScaler

from my_ml_package.preprocessing import StandardScaler

scaler = StandardScaler()

X_scaled = scaler.fit_transform(X)

Algorithms Implemented

  • Linear Regression
  • KNN Classification
  • KNN Regression
  • Artificial Neural Network
  • Hebbian Learning Network
  • Principal Component Analysis (PCA)

Educational Objective

The primary goal of this package is to help students understand Machine Learning algorithms by implementing them from scratch using NumPy and core Python concepts.

Author

Bhagyashree Patil

License

MIT License

Release files for bhagya-my-ml-package 0.2.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 bhagya-my-ml-package 0.2.1
File Size Uploaded
bhagya_my_ml_package-0.2.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bhagya-my-ml-package 0.2.1
File Interpreter ABI Platform
bhagya_my_ml_package-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / bhagya_my_ml_package-0.2.1.tar.gz

Download URL bhagya_my_ml_package-0.2.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ac95e6c843b8c500e8768c553028213c6632284c197c944bf1342155fa89b35a
BLAKE2b-256 checksum
How to use checksums
014fa4d69a30fb6d0c115de4095926835f37bbb1259b673b4d666806536ed8a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / bhagya_my_ml_package-0.2.1-py3-none-any.whl

Download URL bhagya_my_ml_package-0.2.1-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50febeab76d66e99fc4aed504e0d2a3cfb52a744bc4afdce14ef4aa63738d595
BLAKE2b-256 checksum
How to use checksums
5274ce29d1cfe963880fd3cc7dab8d6b27292a492ed0092837daa0c49daa9e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.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