Machine Learning From Scratch in Python - Full Course [FREE]

Patrick Loeber

In this course we implement the most popular Machine Learning algorithms from scratch using pure Python and NumPy.

By the end of this course, you will have a deep understanding of the concepts behind those algorithms.

Each part starts with a short theory section that explains the math and concepts behind the algorithm. Then we jump to the code and implement it in a clean, object oriented style. You will get a hands-on experience with Machine Learning algorithms and feel more confident using them in your own projects.


Beginner Python skills and a little bit of math knowledge (Linear Algebra, Differential Equations) is required to follow the course. NumPy knowledge can be benefitial but is not a must. If you want to have a quick refresher, you can checkout my free NumPy handbook that covers all essential functions. You can get it here.


This is a collection of my ML From Scratch playlist compiled into one single video. The code for all algorithms is available on GitHub. The jupyter notebooks are available on Patreon.

Course Overview

  1. KNN
  2. Linear Regression
  3. Logistic Regression
  4. Regression Refactoring
  5. Naive Bayes
  6. Perceptron
  7. SVM
  8. Decision Tree Part 1
  9. Decision Tree Part 2
  10. Random Forest
  11. PCA
  12. K-Means
  13. AdaBoost
  14. LDA
  15. Load Data From CSV

FREE VS Code / PyCharm Extensions I Use

✅ Write cleaner code with Sourcery, instant refactoring suggestions: Link *

* This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you! 🙏

Check out my Courses