Skip to main content

Neural networks and ML from scratch in pure Python

Project description

text

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 sklearn and torch for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notorch-0.2.3a0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

notorch-0.2.3a0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

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

Hashes for notorch-0.2.3a0.tar.gz
Algorithm Hash digest
SHA256 6380b7760a12fd6024a98de88b4ff5715a58020fe544852da946105c576a7882
MD5 4437da6663c2cae786bd7b1e74ea1abd
BLAKE2b-256 e25a20092b6dd85be35cbe393c75361f89c3228f6db9107c0ecca8eb334b6824

See more details on using hashes here.

Provenance

The following attestation bundles were made for notorch-0.2.3a0.tar.gz:

Publisher: workflow.yml on itsmoe15/NoTorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for notorch-0.2.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 0558d11a486f2f83eeefae8d93837110b1e1f4c6085432b8cea803163a884ddd
MD5 12c61bff922783796063c34d61e94ae8
BLAKE2b-256 ce4b03de82d208d062921a6ef0558e5884e9009cdfe241ac64ee298edf31a6c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for notorch-0.2.3a0-py3-none-any.whl:

Publisher: workflow.yml on itsmoe15/NoTorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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