Custom machine learning package built from scratch
Project description
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
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
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 bhagya_my_ml_package-0.2.1.tar.gz.
File metadata
- Download URL: bhagya_my_ml_package-0.2.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac95e6c843b8c500e8768c553028213c6632284c197c944bf1342155fa89b35a
|
|
| MD5 |
a19d5f63bc6ccdc73b2c48000d832aa0
|
|
| BLAKE2b-256 |
014fa4d69a30fb6d0c115de4095926835f37bbb1259b673b4d666806536ed8a5
|
File details
Details for the file bhagya_my_ml_package-0.2.1-py3-none-any.whl.
File metadata
- Download URL: bhagya_my_ml_package-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50febeab76d66e99fc4aed504e0d2a3cfb52a744bc4afdce14ef4aa63738d595
|
|
| MD5 |
e09c34b2f1dd4a564d2cb8bae8fd9135
|
|
| BLAKE2b-256 |
5274ce29d1cfe963880fd3cc7dab8d6b27292a492ed0092837daa0c49daa9e66
|