# patrickloeber/MLfromscratch

Machine Learning algorithm implementations from scratch.

Repository: https://github.com/patrickloeber/MLfromscratch
Canonical: https://ross.abutalabs.com/products/mlfromscratch
Language: Python
License: MIT
License Family: permissive
Last push: 2024-02-01T21:26:03+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2651, "days_push": 944, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1641, forks 576 (observed 2026-08-28T04:05:15.331237+00:00)

## What it is
A Python repository implementing classic machine learning algorithms (KNN, SVM, decision trees, K-Means, PCA, etc.) from scratch using only NumPy. It accompanies a YouTube tutorial series explaining the math and code behind each algorithm.

## Use cases
- learn how machine learning algorithms work internally
- implement KNN from scratch in python
- understand the math behind SVM and logistic regression
- study a from-scratch decision tree implementation
- teach an intro ML course with simple code examples
- compare naive implementations against scikit-learn

## When to choose
- you want to understand ML algorithms at a fundamental level
- you prefer learning via code paired with video explanations
- you need simple, readable reference implementations for study or teaching

## When to avoid
- you need production-ready, optimized, or feature-complete ML tooling
- you want GPU acceleration or large-scale training
- you need algorithms beyond the small set covered here

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: machine-learning, data-science
- domain: machine-learning, education, tutorials
- platform: python, cross-platform
- tags: from-scratch, educational, numpy, algorithms, tutorial-code

## Member repositories
- patrickloeber/MLfromscratch (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:15.331237+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:46:23.010638+00:00, confidence not recorded.
  - readme: https://github.com/patrickloeber/MLfromscratch (fetched 2026-08-28T04:05:15.331237+00:00, sha bae05fbac8a1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
