mrkeyoor.com_
Fri 04 Sept 16:55 UTC
AI Toolsevaluationupdated 04 Sept 2026

ML-From-Scratch review

ML-From-Scratch is a small Python collection that implements common machine-learning algorithms with NumPy and other basic scientific packages. It lets readers inspect decision trees, regression, clustering, neural-network layers, and training loops without hiding the mechanics behind a large framework.

trackingstars / 7d
Verdict

Our ML-From-Scratch install took 48 seconds and built in 16 seconds, but there was no test target to check any of its algorithms. Read it as a compact teaching aid, then verify every result against a maintained library or your own derivation. Do not make it a production dependency: the default branch has not gained a commit since 2019, while correctness fixes remain open.

We ran it

Lab card: what happened when we ran ML-From-ScratchScreenshot of ML-From-Scratch (github.com/eriklindernoren/ML-From-Scratch)
Install✓ · 48s35 packages · 37 MB
Build✓ · 16s
Testsn/ano test script
Known vulns0(pip-audit)
Repo89 files~6,954 lines of source · 0.3 MB · 0 CI workflows

Answers from our run

Does ML-From-Scratch build from source?

Dependencies installed in 48 seconds (35 packages), and the build succeeded in 16 seconds. We cloned commit a2806c6 into a clean Debian container with 3 CPUs and no project-specific setup.

Does ML-From-Scratch have tests you can run?

Not through a standard command: the project exposes no test script or target that our harness could run.

Does ML-From-Scratch have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use ML-From-Scratch?

Production ML systems: the README says the goal is transparency rather than optimized or computationally efficient algorithms.

What are the alternatives to ML-From-Scratch?

numpy-ml, Python Machine Learning book code, scikit-learn. Our ML-From-Scratch install took 48 seconds and built in 16 seconds, but there was no test target to check any of its algorithms.

Setup4/548-second install and 37 MB, though setup.py and old names remain
Docs3/5Readable catalog and examples, with little API or compatibility detail
Community3/532,610 stars and new reports, but fixes sit unmerged
Maturity2/5No tests or releases; default-branch code stops in 2019

Who it’s for

Students who learn by tracing short Python implementations alongside the underlying math.
Instructors looking for readable examples of classical supervised and unsupervised algorithms.
Experienced developers refreshing how gradients, tree splits, clustering, and neural-network layers work.
Readers willing to debug old examples and compare their output with a maintained reference library.

Who it’s NOT for

Production ML systems: the README says the goal is transparency rather than optimized or computationally efficient algorithms.
Teams that require CI and regression tests before adopting code: our measured checkout had 0 CI workflows, no tests directory, and no test target.
Users expecting every example to run on current dependencies: issue 110 shows polynomial regression failing on an inhomogeneous NumPy array, and issue 123 reports that linear regression raises because regularization becomes None.
Learners who specifically need a transformer implementation on the default branch: issue 133 requests one and pull request 140 remains open.
Projects needing actively maintained package metadata: requirements.txt still names the deprecated sklearn package, with replacement pull requests open since 2025.
Anyone seeking tagged, supported releases: GitHub returned no latest release, and the newest default-branch commit is from 2019.

Setup reality

Our sandbox install succeeded in 48 seconds, adding 35 packages and using 37 MB. The build passed in 16 seconds. There was no tests script or target, so tests were skipped. Pip-audit found 0 known vulnerabilities.

Setup uses python setup.py install and needs no account, API key, database, or network service after dependencies are available. The unpinned requirements include NumPy, SciPy, pandas, matplotlib, cvxopt, Gym, and scikit-learn under its old sklearn package name.

The checkout has no Dockerfile or CI workflow, so you own interpreter and dependency compatibility. Examples are separate scripts rather than a guided test suite. Our build did not run those examples, and open reports show failures in polynomial and linear regression on newer environments.

NumPy implementations expose the mechanics behind familiar models

ML-From-Scratch is designed for reading. Its supervised section includes linear and logistic regression, decision trees, random forests, support-vector machines, nearest neighbors, boosting, and a small XGBoost implementation. The unsupervised side covers clustering, association rules, PCA, mixture models, autoencoders, and generative models. A homegrown neural-network module supplies layers, activations, losses, and optimizers, so readers can follow data through forward and backward passes.

The whole checkout is small enough to browse in an afternoon: our scan found 89 files, about 6,954 lines of source, and 0.3 MB on disk. That compactness is the attraction. A learner can jump from an example into one implementation file and see the arrays being manipulated. There is far less framework machinery to cross than in a current training library.

Thirty-five installed packages are more than the source suggests

Installation still pulls a standard scientific Python environment. Our run added 35 packages and occupied 37 MB, compared with the 0.3 MB checkout. The dependency list includes NumPy, SciPy, pandas, matplotlib, cvxopt, Gym, progress bars, table formatting, and scikit-learn through the old sklearn distribution name. There is no account, model download, hosted service, or secret to configure for the package itself.

The documented command is python setup.py install, and the package declares version 0.0.4. Requirements have no version ranges, so a fresh install resolves whatever compatible packages the index offers that day. Open pull requests propose replacing sklearn with scikit-learn, removing deprecated dataset calls, and correcting formulas. Anyone teaching from a shared environment should freeze a known set rather than asking a class to resolve those differences independently.

What happened when we ran it

Our fresh unprivileged Debian sandbox, with 3 CPUs and 8 GB of RAM, installed ML-From-Scratch in 48 seconds. The install succeeded with 35 packages and 37 MB on disk. The build also succeeded in 16 seconds. Pip-audit reported 0 known vulnerabilities in the installed dependency set at commit a2806c6.

No tests script or target existed, so the lab skipped tests. The measured repository also had no tests directory, 0 CI workflow files, and no Dockerfile. The absence of a failing test log is therefore not evidence that all algorithms work. Our checks established that the package installs and builds; they did not execute polynomial regression, fit a tree, train the neural-network code, or compare predictions against a reference.

That distinction matters more here than it would for a collection of static notes. The project contains numerical algorithms whose mistakes may return plausible output rather than crash. A regression coefficient, probability, or gradient can be wrong while its shape looks right. With 6,954 source lines and no automated checks in the measured checkout, readers must create small known cases or compare results with another implementation.

Open reports identify concrete errors in regression examples

Issue 110 records the polynomial-regression example failing while constructing cross-validation folds because NumPy rejects an inhomogeneous array shape. Pull request 139 proposes a fix and remains open. Issue 123 reports that LinearRegression resets its regularization object to None, then raises when fit tries to call it. These are specific failures in advertised examples, not complaints about speed or coding style.

The measured build took 16 seconds because it did not run those examples. Issue 124 separately argues that logistic regression omits a 1 / n_samples factor in its gradient, and several open pull requests propose a correction. We did not reproduce or adjudicate the mathematical claim in our sandbox. Its unresolved status is enough to require an independent derivation before using that implementation to teach the exact update rule.

Other age markers sit in the dependency and example surface. The requirements still use gym and sklearn, while an open change replaces the deprecated fetch_mldata call. A 2026 request and pull request add a transformer encoder, which confirms that transformers are absent from the current default branch. The existing catalog remains broad for classical methods, but it does not track the center of current deep-learning education.

Community activity continues while the default branch stays frozen

GitHub listed 32,610 stars and 78 combined issues and pull requests when fetched. A separate issue search returned 43 open issues, and users updated a polynomial-regression report in August 2026. New pull requests in 2026 propose a transformer, regression corrections, and a restored image. People still care about the material, even though community activity has not turned into default-branch updates.

GitHub's repository metadata gives October 15, 2023 as the last push, while the newest commit returned for the default branch is a2806c6 from October 18, 2019. GitHub also returned no latest release. Paired with 0 CI workflows and a queue of unmerged fixes, those dates describe code that should be treated as frozen. The repository is not archived, but its open status does not amount to active maintenance.

Use it as annotated source and avoid production dependencies

The 89-file scale is ideal for study. Pick an algorithm, read the implementation beside a trusted explanation, run it on a tiny dataset with a known answer, and step through the arrays. The examples give useful entry points for that work. MIT licensing also makes classroom modification straightforward, provided users keep the license terms.

For application code, the 48-second install and 16-second build do not offset the missing tests, stale default branch, or open correctness reports. Use scikit-learn for maintained classical models and a current framework for deep learning. ML-From-Scratch earns a bookmark as readable source, especially for trees, clustering, and basic neural-network mechanics. It does not earn a place in a production requirements file.

Alternatives

ProjectWhat it isPick it when
numpy-mlA larger NumPy-based machine-learning library with equations and API documentation.pick this instead when you want broader from-scratch coverage and more formal reference material.
Python Machine Learning book codeThe code and notebooks accompanying the third edition of Python Machine Learning.pick this instead when you want examples tied to a structured textbook progression.
scikit-learn gh↗The maintained Python library for classical machine learning and model evaluation.pick this instead when correctness, current dependencies, testing, and production use matter more than seeing every implementation detail.

What people are saying

  1. [github-trending] eriklindernoren/ML-From-Scratch

Sources

  1. ML-From-Scratch README
  2. ML-From-Scratch package setup
  3. Polynomial regression array failure
  4. Linear regression regularization failure
  5. Logistic regression gradient report
  6. Open ML-From-Scratch pull requests

More ai tools reviews

MathModelAgent · Hands-On-AI-Engineering · OpenCluely · text-to-cad · miles · Paddle · the whole board →