Home / Python ML Beginner
Python ML Beginner
Machine learning from zero: NumPy and pandas, regression and classification, evaluation, overfitting, pipelines, clustering, PCA, XGBoost and LightGBM, text and sentiment — ending with house-price and Titanic capstones. Every example run for real.
Machine learning is a program that learns from examples. This course teaches it the practical way: NumPy and pandas for data, scikit-learn for the models, and two full projects at the end — house prices and Titanic.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Machine Learning Basics
- Python ML What Is Machine Learning?
- Python ML Types of Machine Learning
- Python ML Machine Learning vs Deep Learning vs AI
- Python ML The Machine Learning Workflow
- Python ML Set Up Your Machine Learning Environment
Python and Data for ML
- Python ML NumPy Arrays for Machine Learning
- Python ML Pandas DataFrames for Machine Learning
- Python ML Explore Your Data First
- Python ML Plot Your Data
- Python ML Split Data into Train and Test
Your First Model: Regression
- Python ML Linear Regression with scikit-learn
- Python ML Linear Regression from Scratch
- Python ML Gradient Descent from Scratch
- Python ML How Good Is a Regression Model?
- Python ML Multiple and Polynomial Regression
Classification I
- Python ML Logistic Regression
- Python ML Logistic Regression from Scratch
- Python ML K-Nearest Neighbours
- Python ML KNN from Scratch
- Python ML Naive Bayes
Classification II and Evaluation
- Python ML Decision Trees
- Python ML Random Forests
- Python ML Support Vector Machines
- Python ML The Confusion Matrix
- Python ML Precision, Recall, F1 and ROC-AUC
Overfitting and Model Selection
- Python ML Overfitting and Underfitting
- Python ML The Bias-Variance Tradeoff
- Python ML Cross-Validation
- Python ML Hyperparameter Tuning
- Python ML Regularization: Ridge, Lasso and Elastic Net
Preprocessing and Pipelines
- Python ML Handle Missing Values
- Python ML Scale Features and Encode Categories
- Python ML Feature Selection and Feature Engineering
- Python ML Pipelines: Preprocessing Plus Model in One Object
- Python ML Data Leakage and Saving Your Model
Unsupervised Learning
- Python ML What Is Unsupervised Learning?
- Python ML K-Means Clustering
- Python ML K-Means from Scratch
- Python ML Hierarchical Clustering and DBSCAN
- Python ML PCA: Fewer Dimensions, Same Picture
Gradient Boosting
- Python ML Gradient Boosting with scikit-learn
- Python ML XGBoost
- Python ML LightGBM
- Python ML XGBoost vs LightGBM vs Random Forest
- Python ML CatBoost and a First Look at Tuning Boosting
Text and Capstone
- Python ML Turn Text into Numbers
- Python ML Sentiment Analysis
- Python ML Build a Spam Classifier
- Python ML Capstone A: Predict House Prices
- Python ML Capstone B: Survive the Titanic
Learn Python Machine Learning
Python Machine Learning Beginner starts where Python Beginner ends. You already know variables, loops, functions and lists. This course adds the one skill those pieces were pointing at: teaching a program to find patterns in examples, then trusting it with new ones.
The course holds 50 lessons grouped into 10 entries, and runs to about six hours and twelve minutes of reading and practice. It moves in the order a beginner actually needs: what machine learning is, how to handle data, a first regression model, classification, how to tell whether a model is any good, and the two libraries working data scientists reach for first — XGBoost and LightGBM. Text and two capstone projects close the course.
Nothing here is a guess. Every program was executed for real before publication, so the output shown with each program is the output the interpreter really gave. Three lessons build the model twice — once in plain NumPy, once with scikit-learn — and the two versions agree on the same data, so you see what the library is doing for you.
What you will learn
Here is what the 50 lessons cover, in the order they teach it:
- What machine learning is, its four types, and the load, look, clean, split, train, evaluate, improve workflow
- NumPy arrays and pandas tables for machine learning, including shapes, missing values and correlation
- Linear regression with scikit-learn and from scratch, gradient descent, and the metrics that judge a regression
- Logistic regression, k-nearest neighbours and naive Bayes, each built by hand before the library version
- Decision trees, random forests and support vector machines, then the confusion matrix, precision, recall, F1 and ROC-AUC
- Overfitting and underfitting, the bias-variance tradeoff, cross-validation, tuning and regularisation
- Missing values, scaling, encoding, feature selection, pipelines, data leakage and saving a trained model
- Unsupervised learning: k-means, hierarchical clustering, DBSCAN and PCA
- Gradient boosting with scikit-learn, XGBoost, LightGBM and CatBoost, and a head-to-head comparison
- Text into numbers, sentiment analysis, a spam classifier, and two capstones: house prices and Titanic
Who this Python ML course is for
This course starts where Python Beginner ends. Readers who finished Beginner will be on solid ground from the first lesson. Readers who learned the basics elsewhere should be comfortable with variables, loops, functions, lists, dicts and simple classes before starting; the opening lesson names exactly what it assumes.
It suits someone who can already write a small script and now wants programs that learn from data. The capstones are the point: each one is a real dataset with a real score, not a toy example. Career changers, students and hobbyists take this route when toy programs stop being enough.
Added together, the lessons run to about six hours and twelve minutes. Most readers finish inside a month of regular evenings. The middle entries lean on NumPy and pandas from the start, so skipping ahead tends to surface gaps quickly.
How this course works
Every program on these pages ran for real before it was published. The output printed beside it is the output the interpreter gave, not a guess. That matters most when a lesson turns on ordering or rounding, where a guessed line would teach the wrong thing.
The entries run in one fixed order. A lesson on tuning a model leans on the evaluation lesson before it, and the boosting lessons lean on the decision tree lesson. Reading out of order is allowed, but the missing piece usually shows up fast.
Every lesson ends with one exercise. You pick an answer, then read why it is right and why the tempting answers are wrong. That short check turns reading into a small test of what stuck.
Your place is saved right here in this browser, with no account and no cost. Close the tab and come back later: the course remembers where you stopped.
Frequently asked questions
Do I need to finish Python Beginner first?
Yes, or know the same ground from elsewhere: variables, loops, functions, lists, dicts, simple classes and files. The opening lesson names exactly what it assumes, so you can check in a minute.
How much maths do I need?
School-level arithmetic and a little algebra. Gradient descent and the loss functions are taught with small worked numbers first, and the from-scratch lessons show every step in code. No calculus background is assumed.
Which library do I learn first?
NumPy and pandas first, for handling data. Then scikit-learn, which supplies the models. XGBoost and LightGBM come last, in section nine, once the ideas behind boosting are already in place.
Does this course teach deep learning?
No. It teaches classical machine learning end to end: regression, classification, clustering, boosting and text. Deep learning belongs to PyTorch Beginner, which is the natural next course.
How long does Python ML Beginner take to complete?
The lesson minutes add up to 372, roughly six hours and twelve minutes in total. Most readers finish inside a month of regular evenings, one or two entries per sitting.
What can I build once I finish this course?
Two finished projects: a house-price regression model and a Titanic survival classifier, each with a real score. Along the way you build a spam classifier, a sentiment analyser and a clustering model — the five programs the Top 50 Machine Learning interview sheet tests.
Next steps
- PyTorch Beginner ❯ — The deep-learning next step: tensors, autograd and your first trained neural network, in 79 lessons.
- Pandas Beginner ❯ — The data side, in depth: 50 lessons on tables, cleaning, grouping and charts.
- Python Intermediate ❯ — Bigger Python programs that do real jobs: functions, classes, files and testing, in 52 lessons.