Lightweight modular ML library from scratch in Python
Project description
BareMetalML
BareMetalML is a lightweight, modular machine learning library built from scratch in Python by Askari Abidi.
It is designed for learning, experimentation, and educational purposes, providing a clear and simple interface for core machine learning algorithms and preprocessing tools.
All models and transformers are implemented using pure NumPy, making the library easy to understand and extend.
Features
Easy and Modular Imports
BareMetalML allows modular imports, so you don’t need to worry about the internal file structure.
For example, you can import any model or transformer like this:
from baremetalml import LinearRegression, StandardScaler
No need to know which file the class is defined in — everything is ready to use.
Core Models
Linear Regression – Ordinary Least Squares (Normal Equation) and Gradient Descent methods
Logistic Regression – Binary classification with Gradient Descent optimization
K-Nearest Neighbors (KNN) – Classification and Regression with multiple distance metrics
Preprocessing & Transformers
StandardScaler – Standardizes features to mean=0, standard deviation=1
NormalScaler – Min-max scaling to [0,1]
LabelEncoder – Converts categorical labels to integers
OneHotEncoder – Converts categorical features into one-hot encoded vectors
PolynomialFeatures – Generates polynomial and interaction features up to a given degree
Base Classes
BaseModel – Abstract base class for all models with input validation
BaseTransformer – Abstract base class for all transformers with fit, transform, and fit_transform interface
What’s Inside
BareMetalML includes:
All basic regression and classification models to start learning ML from scratch
Preprocessing tools for handling numerical and categorical data
Feature engineering utilities like polynomial feature generation
Modular structure for easy imports and extensibility
Installation
BareMetalML is available on PyPI. Install it with:
pip install baremetalml
Then import the modules you need:
from baremetalml import LinearRegression, StandardScaler, KNNClassifier
Author
Askari Abidi
Contribute & Support
BareMetalML is an open-source educational project.
Feel free to contribute, suggest improvements, or report issues on the repository.
If you find it useful, you can support the project via donations or by sharing it with others. Every contribution helps make learning ML from scratch easier and more accessible!
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 baremetalml-1.0.0.tar.gz.
File metadata
- Download URL: baremetalml-1.0.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23432a62ae4ab9e4912d3310cb8ebe3c802084b774c2ea34066fcc52c9e78e39
|
|
| MD5 |
3fa9ed7f4651c6810cb105cfb2ca1b90
|
|
| BLAKE2b-256 |
6c5b98784b65eb68580a99f47b6018da15c84e06982f91534221a19219961cb5
|
File details
Details for the file baremetalml-1.0.0-py3-none-any.whl.
File metadata
- Download URL: baremetalml-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dddd2e5bb32310c05768d0583536f72cdd823169131c8fb41686f17e42f77118
|
|
| MD5 |
7c3189645e8382b0e9e469802ccaf3e3
|
|
| BLAKE2b-256 |
1814a694f86a0502c0a2369b5148ac0460a7e42d631af8dffce5d97154a36423
|