
Python is the language most machine learning work is done in. You don't need to master all of it – you need the right parts, in the right order. This roadmap takes you from your first line of Python to a deployed machine learning model in six stages, with the libraries, the math and the projects that matter at each step.
If you'd rather follow it with an instructor, projects and feedback, our machine learning course with Python covers the same path, live online or in person in Mississauga.
Python isn't the fastest language. It's the default for machine learning because of what's been built on top of it:
R is still strong for statistics, and C++ runs underneath many libraries. But if your goal is a machine learning job, learn Python first.
The roadmap at a glance
| Stage | Focus | Key tools | Typical time* |
|---|---|---|---|
| 1 | Core Python | Python 3, Jupyter, pip | 3–4 weeks |
| 2 | Working with data | NumPy, pandas, Matplotlib | 3–4 weeks |
| 3 | The math you need | Linear algebra, probability, statistics | Alongside stages 2–4 |
| 4 | Classical machine learning | scikit-learn | 5–6 weeks |
| 5 | Deep learning | PyTorch or TensorFlow | 5–6 weeks |
| 6 | Deploying models | FastAPI, Docker, Git | 2–3 weeks |
At roughly 8–10 hours a week for a beginner. With prior coding experience, stages 1–2 go much faster.
Stage 1: Learn core Python (the parts ML actually uses)
You don't need to become a software engineer before touching machine learning. You need enough Python to read and write data-handling code comfortably.
Learn:
Stage 2: Work with data using NumPy, pandas and Matplotlib
Most machine learning time goes into preparing data, not training models. This stage is where Python for machine learning really starts.
Mini project: take a public dataset (for example, a Kaggle housing dataset), clean it, handle missing values, and produce five charts that explain it.
Stage 3: Learn the math alongside the code
You don't need a math degree, but you do need to understand what your models are doing. Learn these in parallel with stages 2–4, not before them:
The practical trick: implement each idea in NumPy. Multiplying two matrices in code teaches you more than reading about it.
Stage 4: Classical machine learning with scikit-learn
This is where you train your first real models. scikit-learn gives every algorithm the same simple interface – fit, predict, score – so you can focus on the ideas.
Learn:
GridSearchCVYour first model in 10 lines. This trains a classifier on scikit-learn's built-in breast cancer dataset and reports how well it performs:
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report
X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42, stratify=y)
model = make_pipeline(StandardScaler(), LogisticRegression(max_iter=1000))
model.fit(X_train, y_train)
print(classification_report(y_test, model.predict(X_test)))
What's happening: the data is split so 20% is held back for testing, the pipeline scales the features and then fits a logistic regression, and the report shows precision and recall on data the model has never seen. Change LogisticRegression to RandomForestClassifier and compare – that habit of testing alternatives is the core of practical machine learning.
Mini projects: predict house prices (regression) and customer churn (classification) from real datasets.
Stage 5: Deep learning with PyTorch or TensorFlow
Deep learning handles images, text and audio, where classical models struggle. Pick one framework and stick with it for your first projects:
Learn: tensors, automatic differentiation, writing a training loop, neural network layers, convolutional networks (CNNs) for images, and using pre-trained transformer models from Hugging Face for text tasks like sentiment analysis.
Mini projects: an image classifier on a public dataset, and a sentiment classifier using a pre-trained model.
Stage 6: Deploy your models
A model in a notebook isn't a product. Employers want to see that you can ship one.
Mini project: wrap your churn model in a FastAPI endpoint, containerize it, and deploy it to a free cloud tier. Put the link on your résumé.
You can learn Python for machine learning for free. The Python tutorial, the scikit-learn user guide and the PyTorch tutorials are excellent. Self-study works well if you're disciplined and already comfortable with code.
A structured course is worth it when you want:
Pragra's AI & Machine Learning bootcamp follows this roadmap across 10 modules and 10 hands-on projects, from Python and data analysis to deep learning, NLP and deployment. You can join live online classes from anywhere in Canada or the US, or attend in-person classes in Mississauga. If you mainly want the data side, the Data Science with Python course is a good starting point.
Planning a career switch? Read how to become a machine learning engineer in Canada.
For a beginner studying 8–10 hours a week, about 4–6 months to reach a job-ready portfolio covering classical ML, basic deep learning and deployment. Core Python alone takes about a month. With prior programming experience it can be half that.
Python plus its libraries covers almost all machine learning work. You'll also want SQL for pulling data, Git for version control, and enough math to understand how models learn.
You need high-school algebra to start. Linear algebra, probability and basic calculus become important as you go further, and they're easiest to learn alongside the code rather than before it.
Either is fine. PyTorch is more common in research and reads like plain Python; TensorFlow with Keras has a gentle high-level API. Pick one, build two projects, then learn the other if a job needs it.
NumPy, pandas, Matplotlib, scikit-learn, and one of PyTorch or TensorFlow. Hugging Face Transformers is increasingly important for text and generative AI work.
Yes. Many machine learning practitioners come from engineering, finance, science or self-taught backgrounds. What employers check is whether you can build and explain working models, so projects matter more than degrees for many roles.
Yes. Pragra's AI & machine learning course runs live online and in person at our Mississauga classroom, with the same curriculum and certificate.
Explore more news and insights from Pragra