How to learn machine learning from scratch in 2026
Learn enough Python to write and debug small programs, pick up the linear algebra, calculus, and probability that machine learning uses, then train classic models with scikit-learn before you move to deep learning. Build one small project at each stage. At 5 to 10 hours a week, a rough estimate is six to twelve months before you can train, evaluate, and explain a model on data of your own.
Every resource below was checked on its own site in October 2026. Prices and course formats change, so check the page before you commit money or time.
What you need to know before you start machine learning
You do not need a degree. You do need three things.
Python. Google's Machine Learning Crash Course lists the Python it expects: functions with positional and keyword parameters, dictionaries, lists, sets, loops, conditionals, string formatting, and basic data types. It also asks for some comfort with the command line. The fast.ai course says a year of coding experience is enough, preferably in Python.
Linear algebra and calculus. Google's prerequisites name variables, linear equations, graphs of functions, tensors, and matrix multiplication. Derivatives, gradients, partial derivatives, and the chain rule are listed as optional, for advanced topics. fast.ai asks only that you have "at least followed a high school math course" and teaches the calculus and linear algebra you need along the way.
Probability and statistics. Google lists mean, median, outliers, standard deviation, and reading histograms. Andrej Karpathy's course asks for "intro-level math (e.g. derivative, gaussian)."
You also do not need special hardware to begin. fast.ai says you "don't need any special hardware or software" for its course.
A machine learning roadmap in five stages
The time estimates are rough and assume 5 to 10 hours a week. Overlap the stages. Most people learn the math best when a model they are building needs it.
1. Python and data handling (rough estimate: 4 to 8 weeks)
If you already program in another language, the official Python tutorial is a fast start. Its own note says it is written for programmers who are new to Python, "not beginners who are new to programming." If you are new to code, start with Kaggle Learn, which describes its material as "no-cost courses" covering Python, data visualization, pandas, and more.
You are done with this stage when you can load a CSV file, clean missing values, group and summarize the data, and draw a chart, without copying code line by line.
2. The math, in parallel (rough estimate: 6 to 10 weeks, alongside stages 1 and 3)
For intuition, 3Blue1Brown's Essence of linear algebra is a video series on "visualizing core ideas of linear algebra." For a book, Mathematics for Machine Learning by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong was published by Cambridge University Press in 2020. The authors say they "will keep PDFs of this book freely available."
Do not try to finish all the math first. Learn vectors, matrices, derivatives, and basic probability, then return to the book when a concept in a course stops making sense.
3. Classic machine learning with scikit-learn (rough estimate: 6 to 10 weeks)
Do not skip this stage: it is the one that teaches you to tell a good model from a lucky one. Learn regression, classification, decision trees, and clustering. Above all, learn evaluation: train, validation, and test splits, cross-validation, overfitting, and metrics that fit the problem.
Good options:
- Andrew Ng's Machine Learning Specialization on Coursera, from Stanford Online and DeepLearning.AI. The course page calls it a beginner-level, three-course series and estimates "2 months at 10 hours a week." The page lists a Coursera subscription at $49 a month and says you cannot take the course for free. Since August 2025, Coursera offers a free preview of the first module instead of a free audit, and it offers financial aid. Check the page for the options shown to you.
- Google's Machine Learning Crash Course, which its page describes as "fast-paced" and "practical," with 12 modules of animated videos, interactive visualizations, and exercises.
- The scikit-learn MOOC from Inria and the scikit-learn developers. It is free, self-paced, published under a CC-BY license, and asks only for basic Python.
- The scikit-learn documentation itself. The User Guide explains each method, and the Examples gallery has runnable examples grouped by task, such as classification, regression, and clustering. Version 1.9.1 was the current stable release in October 2026.
4. Deep learning (rough estimate: 8 to 12 weeks)
- fast.ai, Practical Deep Learning for Coders. The course page calls it "a free course designed for people with some coding experience." It says there are 9 lessons of around 90 minutes each. It is top-down: you train working models first and learn the theory as you go.
- Dive into Deep Learning (d2l.ai). An open-source "interactive deep learning book with code, math, and discussions," implemented in PyTorch, NumPy/MXNet, JAX, and TensorFlow. The site says it has been "adopted at 500 universities from 70 countries."
- Neural Networks: Zero to Hero by Andrej Karpathy. A series of YouTube lectures that starts with backpropagation and builds up to a GPT model and its tokenizer. It asks for "solid programming (Python)."
Pick one as your main path and use the others as reference. Switching courses every two weeks is an easy way to stall.
5. Projects and a specialty (ongoing)
Kaggle's Titanic competition is labeled "Start here!" and asks you to predict survival on the Titanic, a small first end-to-end project. After that, pick a problem with data you care about: your own spending, a sports league, public transit times, a dataset from work you are allowed to use.
For a specialty, Hugging Face Learn lists courses on large language models, agents, deep reinforcement learning, computer vision, audio, and diffusion models. Choose one area only after you can train and evaluate a model in stage 3.
A good portfolio project has a clear question, a baseline model, an honest evaluation, and a short write-up of what failed.
Where Gregator fits in this roadmap
Gregator is our product, and it fits the gaps a course leaves: a concept the lecture skipped, or a side topic one project needs. Type a topic such as "Bias-variance tradeoff and cross-validation, explained for Python beginners", and it writes a course sized to that one gap from open-web sources that can include arXiv papers, with footnotes and a Sources list in each Chapter. Each Chapter has up to 5 multiple-choice questions with an explanation per option, and Greg, the chat tutor, can offer a deep dive that adds a Chapter on the part you need. It does not read your own files or notebooks, it is English-first, and it does not replace writing code: fill the gap, then go back to your project. If you are choosing between a course and a chat assistant for this, see Gregator vs ChatGPT.
Common mistakes when learning machine learning
- The tutorial loop. Watching a third course instead of finishing one project. Set a rule: one project per stage.
- Math first, forever. Months of linear algebra before any model. Learn the math alongside the code.
- Skipping evaluation. A high score on the training data means little. Always hold out a test set and compare against a simple baseline.
- Starting with large language models. They are the most visible part of the field, but the core skills are data handling and evaluation, and those transfer to every specialty.
Frequently asked questions
Can I learn machine learning without a math background?
Yes, if you are willing to learn the math as you go. fast.ai asks only for high school math and teaches the rest. Google's Crash Course treats calculus as optional. You will need linear algebra and probability to go past the basics.
How long does it take to learn machine learning from scratch?
Roughly six to twelve months at 5 to 10 hours a week to reach the point where you can build and evaluate a model on your own data. This is an estimate. It depends on your coding background and how much time you spend on projects.
Is Andrew Ng's Machine Learning Specialization free?
No. Its Coursera page lists a subscription at $49 a month and says you cannot take the course for free. You can preview the first module for free, and Coursera offers financial aid to learners who cannot afford the fee.
Should I start with fast.ai or Andrew Ng?
If you learn by building, start with fast.ai. It is top-down and gets you to working models fast. If you want the concepts in order first, start with the Machine Learning Specialization. Many learners do one, then the other.
Do I need a GPU to learn machine learning?
Not at the start. Classic models with scikit-learn run on a normal laptop, and fast.ai says you need no special hardware or software for its course.
Sources
- Practical Deep Learning for Coders (fast.ai)
- Dive into Deep Learning (d2l.ai)
- Machine Learning Specialization (Coursera)
- Introducing Coursera's new course preview experience (Coursera Blog)
- Machine Learning Crash Course (Google for Developers)
- Machine Learning Crash Course prerequisites and prework (Google for Developers)
- scikit-learn: machine learning in Python (scikit-learn)
- Machine learning in Python with scikit-learn MOOC (Inria)
- Mathematics for Machine Learning (mml-book.github.io)
- Essence of linear algebra preview (3Blue1Brown)
- The Python Tutorial (Python documentation)
- Kaggle Learn (Kaggle)
- Titanic - Machine Learning from Disaster (Kaggle)
- Neural Networks: Zero to Hero (Andrej Karpathy)
- Hugging Face Learn (Hugging Face)