Neural networks and ML from scratch in pure Python
Project description
NoTorch 🕯
A pure Python, educational machine learning library — built from scratch.
NoTorch is a learning-focused machine learning and deep learning library that re-implements popular models using only core Python (and pandas for data handling). Inspired by the design of scikit-learn and PyTorch, NoTorch offers a simple and consistent API while prioritizing readability, clarity, and educational value over performance or production use.
This project is being developed as part of a personal journey to deeply understand how machine learning works — and to help others learn by example. Whether you're a student, a hobbyist, or just curious about what happens under the hood of your favorite ML libraries, NoTorch is here to make complex concepts transparent and approachable.
🔍 Project Goals
- ✅ Build core ML and DL models from scratch in pure Python
- ✅ Keep the code readable, modular, and well-documented
- ✅ Mimic the familiar APIs of
sklearnandtorchfor a smoother learning curve - ✅ Prioritize educational clarity over performance or abstraction
- ✅ Share the learning journey with the community
✅ Implemented Models
Classical Machine Learning
- K-Nearest Neighbors (KNN)
- Decision Tree
- Random Forest
- Naive Bayes
- Linear Regression
- Logistic Regression
- Support Vector Machine (SVM)
Neural Networks (Coming Soon)
- Basic Feedforward Neural Network
- Manual Backpropagation Engine
- Custom Autograd System (Experimental)
- Convolutional Neural Networks (CNNs)
- Recurrent Neural Networks (RNNs)
- Long Short-Term Memory (LSTM)
🛠 Example Usage
KNN Model
from NoTorch.KNN import KNN
model = KNN(n_neighbors=1)
model.fit(X_train, y_train)
print(model.predict(X_test))
🚧 This Project is Under Active Development
NoTorch is a work-in-progress, built step-by-step with the intent to learn by building. Contributions, ideas, and educational feedback are very welcome!
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 notorch-0.2.3a0.tar.gz.
File metadata
- Download URL: notorch-0.2.3a0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6380b7760a12fd6024a98de88b4ff5715a58020fe544852da946105c576a7882
|
|
| MD5 |
4437da6663c2cae786bd7b1e74ea1abd
|
|
| BLAKE2b-256 |
e25a20092b6dd85be35cbe393c75361f89c3228f6db9107c0ecca8eb334b6824
|
Provenance
The following attestation bundles were made for notorch-0.2.3a0.tar.gz:
Publisher:
workflow.yml on itsmoe15/NoTorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notorch-0.2.3a0.tar.gz -
Subject digest:
6380b7760a12fd6024a98de88b4ff5715a58020fe544852da946105c576a7882 - Sigstore transparency entry: 265286407
- Sigstore integration time:
-
Permalink:
itsmoe15/NoTorch@82458ffd1de0acc0b2c518733d298cec3417e351 -
Branch / Tag:
refs/tags/v0.2.3a0 - Owner: https://github.com/itsmoe15
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@82458ffd1de0acc0b2c518733d298cec3417e351 -
Trigger Event:
release
-
Statement type:
File details
Details for the file notorch-0.2.3a0-py3-none-any.whl.
File metadata
- Download URL: notorch-0.2.3a0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0558d11a486f2f83eeefae8d93837110b1e1f4c6085432b8cea803163a884ddd
|
|
| MD5 |
12c61bff922783796063c34d61e94ae8
|
|
| BLAKE2b-256 |
ce4b03de82d208d062921a6ef0558e5884e9009cdfe241ac64ee298edf31a6c4
|
Provenance
The following attestation bundles were made for notorch-0.2.3a0-py3-none-any.whl:
Publisher:
workflow.yml on itsmoe15/NoTorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notorch-0.2.3a0-py3-none-any.whl -
Subject digest:
0558d11a486f2f83eeefae8d93837110b1e1f4c6085432b8cea803163a884ddd - Sigstore transparency entry: 265286408
- Sigstore integration time:
-
Permalink:
itsmoe15/NoTorch@82458ffd1de0acc0b2c518733d298cec3417e351 -
Branch / Tag:
refs/tags/v0.2.3a0 - Owner: https://github.com/itsmoe15
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@82458ffd1de0acc0b2c518733d298cec3417e351 -
Trigger Event:
release
-
Statement type: