Home › Courses › Core ML: Algorithms from Scratch

Core ML: Algorithms from Scratch

Build every classic ML algorithm by hand, then verify against scikit-learn

4 phases. 18 lessons. 18 labs. The classical ML algorithms every data scientist uses (linear and logistic regression, SVM, decision trees, random forests, KNN, K-Means, DBSCAN, Naive Bayes, boosting and ensembles), each implemented from scratch in pure Python, then benchmarked against scikit-learn to show they work. You build a complete ML library and come away knowing what scikit-learn does under the hood.

Implement machine learning algorithms in Python

Write the training logic and review how your predictions compare with a reference. Start with linear regression before moving to classification and model selection.

4 phases · 18 lessons · 18 labs

Take Math for AI & ML first — this course builds on it.

What you finish with

Curriculum

Tools

NumPy · scikit-learn · pandas · Matplotlib · SciPy

What core ML from scratch actually is

It's the practice of implementing every classical ML algorithm — linear regression, logistic regression, SVM, decision trees, random forests, KNN, K-Means, Naive Bayes, boosting — in pure Python, without using scikit-learn's implementations. You build the algorithms, test them on real data, and benchmark against scikit-learn to prove they work.

What you do every day

You build ML models for real problems, but you understand every algorithm at the implementation level. When a model underperforms, you know whether it's the algorithm, the data, or the hyperparameters — because you built the algorithm yourself. When you need a custom variant, you can modify the implementation instead of waiting for scikit-learn to add it.

Why companies hire for this

Every company uses scikit-learn, but most engineers treat it as a black box. The engineer who can implement the algorithms from scratch is the one who can debug production ML issues, tune models intelligently, and build custom solutions when off-the-shelf libraries don't fit. That's the difference between an ML practitioner and an ML engineer.

What this course is not

It is not a theory course. Every algorithm is implemented in code and tested on real data. It is not a scikit-learn tutorial — you'll use scikit-learn to verify your from-scratch implementations, not to replace them. And it is not a deep learning course — that's the next course in the chain.

Common questions

Do I need Math for AI & ML first?

Yes. This course uses linear algebra (matrix operations), calculus (gradient descent) and probability (Naive Bayes, distributions) throughout. Math for AI & ML builds those foundations; this course uses them to build working ML algorithms.

Why implement algorithms from scratch when scikit-learn exists?

Because the gap between someone who calls fit() and someone who can debug, tune, and extend the algorithm is the gap between junior and senior. When scikit-learn produces unexpected results, the engineer who built the algorithm from scratch knows why. When a custom requirement doesn't fit any library, the engineer who built from scratch can modify the algorithm.

How is this different from the ML phase in ML & AI Engineering?

ML & AI Engineering covers ML in 9 lessons as part of a broader curriculum, enough to use scikit-learn well. This course spends 18 lessons implementing every algorithm from scratch, building a complete library and benchmarking it against scikit-learn. Using a tool versus understanding it.

What do I end up with?

A complete, tested Python ML library with every core algorithm implemented from scratch and benchmarked against scikit-learn. Plus the ability to read any ML algorithm's source code and understand what it does, why it works, and how to modify it.

Continue your learning path

Math for AI & ML · Deep Learning from Scratch · ML & AI Engineering · Reinforcement Learning

Start the Core ML: Algorithms from Scratch course

Create a free account — the opening phases of 29 of 35 courses, and the first lesson of every phase, are free, no credit card. Or see Pro pricing.

All courses · Pricing · About · FAQ · Glossary · Projects by topic