Skip to main content

Beginner-friendly Machine Learning utility library built from scratch using pure Python

Project description

Custom_ML_Suite

Custom_ML_Suite is a beginner-friendly Machine Learning utility library built completely from scratch using pure Python.

This project focuses on understanding the mathematical foundations of Machine Learning by manually implementing core ML algorithms, preprocessing methods, distance metrics, activation functions, statistical operations, and evaluation metrics without using external ML libraries like scikit-learn.


Features

  • Pure Python implementation
  • Beginner-friendly code structure
  • Mathematical formulas included
  • Well-commented educational code
  • Modular package structure
  • ML utilities from scratch
  • Edge-case handling
  • Easy to understand and extend

Modules Included

1. activations.py

Activation functions used in neural networks.

Functions

  • sigmoid()
  • relu()
  • tanh()
  • softmax()
  • log_loss()

2. distances.py

Distance and similarity metrics.

Functions

  • euclidean_distance()
  • manhattan_distance()
  • minkowski_distance()
  • cosine_similarity()
  • hamming_distance()

3. preprocessing.py

Data preprocessing and scaling methods.

Functions

  • standardization()
  • mean()
  • min_max_scaling()
  • range()
  • normalization()

4. stats.py

Basic statistical operations.

Functions

  • mean()
  • variance()
  • std_dev()
  • covariance()
  • correlation()

5. metrics.py

Machine Learning evaluation metrics.

Functions

  • accuracy_score()
  • precision_score()
  • recall_score()
  • f1_score()
  • confusion_matrix()
  • mean_absolute_error()
  • mean_squared_error()
  • root_mean_squared_error()
  • r2_score()
  • binary_crossentropy()

6. model_selection.py

Dataset splitting and validation utilities.

Functions

  • train_test_split()
  • shuffle_data()
  • batch_iterator()
  • k_fold_split()
  • stratified_split()

7. linear_model.py

Basic regression models and optimization.

Functions

  • linear_regression()
  • predict()
  • gradient_descent()
  • logistic_regression()
  • logistic_update()

8. neighbors.py

K-Nearest Neighbors utilities.

Functions

  • knn_distance()
  • knn_predict()
  • probability()

9. tree.py

Basic Decision Tree utilities.

Functions

  • gini_impurity()
  • entropy()
  • information_gain()
  • best_split()
  • build_tree()
  • predict_tree()
  • majority_vote()

Project Structure

Custom_ML_Suite/
│
├── examples/
│   ├── demo.py
│   └── Formula.py
│
├── src/
│   └── Custom_ML_Suite/
│       ├── __init__.py
│       ├── activations.py
│       ├── distances.py
│       ├── linear_model.py
│       ├── metrics.py
│       ├── model_selection.py
│       ├── neighbors.py
│       ├── preprocessing.py
│       ├── stats.py
│       └── tree.py
│
├── tests/
│   └── test_all.py
│
├── README.md
├── pyproject.toml
└── .gitignore

# Authors

Aryan Kakade  
Kishor Handge  

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

mak_mini_ml-0.1.3.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

mak_mini_ml-0.1.3-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file mak_mini_ml-0.1.3.tar.gz.

File metadata

  • Download URL: mak_mini_ml-0.1.3.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mak_mini_ml-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a8c5cd4fe5e10081d5925599e5022b5fbc5de4231da659d7f584fbae8b66f594
MD5 fae40f7b3cbcdf8c29ffcf2ee089c8ea
BLAKE2b-256 862867e5609f2f581e33c9339a38c8abec780e75ce71e10feb8f6ba0f1fcd5b9

See more details on using hashes here.

File details

Details for the file mak_mini_ml-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mak_mini_ml-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mak_mini_ml-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 66bd470bc5880d1f64232771a54db2b857d83e6adc361a721ccf6b00195b6c6b
MD5 9d32d7c72c01897f49b7426fcecf9e77
BLAKE2b-256 9c4287b729b1d89ffeb4cff0337c746ef77ac27313a906a0de44f09ce2cb7cd7

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