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:

4. Deep learning (rough estimate: 8 to 12 weeks)

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

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