Skip to content

OnePocketLab

COMPLETE COURSE

Machine Learning

Turn data into understanding with clear visual lessons.

All levelsEnglish8 chapters62 visual lessons15 free previews
Open the classroom chapter map

ONE CHAPTER AT A TIME

Course curriculum

01ML Fundamentals8 lessons · Beginner · Free chapter1.1
What Is Machine Learning?

A plain-language introduction to machine learning: what it is, why it exists and how it differs from the step-by-step programming you may already know.

Free preview
1.2
AI vs. Machine Learning vs. Deep Learning

How artificial intelligence, machine learning and deep learning relate: three nested rings rather than three separate fields, each one a specific way of doing the one outside it.

Free preview
1.3
Types of Machine Learning: Supervised, Unsupervised and Reinforcement

Machine learning splits into three families by what the learner is told: the answer every time, nothing at all, or a score after acting. Supervised, unsupervised and reinforcement, mapped.

Free preview
1.4
How Machines Learn From Data: Features, Labels and Models

Every supervised model is built from three pieces: features (the inputs), labels (the answers) and a model that maps one to the other. This lesson defines the vocabulary you will use everywhere else.

Free preview
1.5
The Machine Learning Workflow: From Data to Deployment

Real machine learning is a circuit: frame the problem, get data, clean and split it, train, evaluate, deploy, then go round again. This lesson walks the whole pipeline end to end.

Free preview
1.6
Training, Validation and Test Sets

Splitting data into training, validation and test sets is how you measure a model honestly. This lesson explains each set's job and why the test set may be touched only once.

Free preview
1.7
Overfitting and Underfitting

Overfitting memorizes noise. Underfitting misses the pattern. This lesson explains the bias and variance trade-off, and the practical signs and fixes for each failure.

Free preview
1.8
Evaluating Model Performance

The right metric depends on what a mistake costs. This lesson covers accuracy, precision, recall, F1 and the confusion matrix for classification, plus MAE, RMSE and R² for regression.

Free preview
View chapter overview
02Python for ML7 lessons · Beginner · 1 free preview2.1
Setting Up Your Python Environment

A practical, step-by-step setup: installing Python, using pip, isolating projects with virtual environments and getting NumPy, Pandas, Matplotlib and scikit-learn installed.

Free preview
2.2
Python Basics for Machine Learning: Variables, Lists and Functions

The small slice of Python you actually need for machine learning: variables, lists, dictionaries, loops and functions. Just enough to read every code example here.

2.3
NumPy: Arrays and Vectorized Computation

NumPy's array is the foundation every ML library is built on. This lesson covers arrays, vectorized operations, broadcasting and why loops are the slow way.

2.4
Pandas: Loading and Exploring Data

Pandas is how you load, inspect, filter and reshape tabular data in Python. This lesson covers the DataFrame and the handful of operations every project relies on.

2.5
Data Visualization with Matplotlib

A chart reveals in seconds what a table hides. This lesson covers the plots that matter for ML, the figure-and-axes model, and when to reach for each chart.

2.6
An Introduction to scikit-learn

scikit-learn wraps dozens of algorithms behind one consistent interface: fit, predict, score. This lesson covers that pattern and the pipeline that ties preprocessing to models.

2.7
Working Effectively in Jupyter Notebooks

Notebooks mix code, output and notes in one document, ideal for exploring data. This lesson covers cells, hidden kernel state and the habits that keep a notebook trustworthy.

View chapter overview
03Data & Preprocessing8 lessons · Beginner · 1 free preview3.1
Understanding Your Dataset: Rows, Columns and Data Types

Before cleaning or modeling anything, you have to know what you are holding. This lesson covers the first look: shape, types, ranges, gaps and the questions each one answers.

Free preview
3.2
Handling Missing Data

Real data has gaps. This lesson covers why values go missing, the three moves available to you, and why the fact that a value was missing is itself worth keeping.

3.3
Encoding Categorical Data: One-Hot and Label Encoding

Models take numbers, and half your columns are words. This lesson covers one-hot and ordinal encoding, when each is right, and the order you accidentally invent by choosing wrong.

3.4
Feature Scaling: Normalization and Standardization

When one column runs 0 to 200,000 and another 0 to 100, the big one dominates by accident. This lesson covers standardization, normalization and which models care.

3.5
Feature Engineering: Creating Better Inputs

A model can only see what is a column. This lesson covers turning raw fields into features it can learn from, and why this beats swapping in a fancier algorithm.

3.6
Handling Outliers

A single extreme value can drag a whole model. This lesson covers finding outliers, deciding whether they are errors or real, and what to do about each.

3.7
Splitting Data in Practice: Cross-Validation

One split gives a noisy score. Cross-validation lets every row take a turn being tested, and the spread of the fold scores tells you how much to trust the average.

3.8
Imbalanced Datasets

When 99% of rows are one class, accuracy stops meaning anything. This lesson covers the trap, the resampling options, class weights and which metrics still work.

View chapter overview
04Supervised Learning12 lessons · Intermediate · 1 free preview4.1
Supervised Learning

Supervised learning is the branch of machine learning where the model learns from examples whose correct answer is already known, using features to predict a label.

Free preview
4.2
Regression: Predicting a Number

Regression is the supervised learning task of predicting a number. This lesson covers how it works and how to measure error with MAE, MSE, RMSE and R².

4.3
Linear Regression

Linear regression predicts a number by fitting the straight line that best matches your data. Includes an interactive best-fit line you can drag and reshape yourself.

4.4
Regularization: Ridge, Lasso and Preventing Overfitting

Regularization penalizes large coefficients so a model fits the signal, not the noise. This lesson covers Ridge, Lasso and how the penalty strength trades bias for variance.

4.5
Classification: Predicting a Category

Classification is the supervised learning task of predicting a category. This lesson covers binary vs. multiclass problems and how to judge a classifier with a confusion matrix.

4.6
Logistic Regression

Logistic regression classifies by predicting a probability. This lesson explains the sigmoid curve, the decision threshold and why the name still says "regression."

4.7
Naive Bayes Classifiers

Naive Bayes classifies by combining how likely each feature is under each class, assuming features are independent. This lesson covers the idea, the assumption and spam filtering.

4.8
K-Nearest Neighbors (KNN)

K-Nearest Neighbors classifies a new example by looking at the most similar past examples and taking a vote. This lesson covers distance, the meaning of K and its trade-offs.

4.9
Decision Trees

A decision tree classifies by asking a sequence of yes-or-no questions about the data. This lesson covers how trees are built, why they overfit and what pruning does.

4.10
Random Forests

A random forest combines many decorrelated decision trees and lets them vote, fixing the overfitting a single tree suffers. This lesson covers bagging, feature randomness and why it works.

4.11
Gradient Boosting: XGBoost and Friends

Gradient boosting builds trees one at a time, each correcting the errors of the last. This lesson covers boosting vs bagging, learning rate and why XGBoost dominates tabular data.

4.12
Support Vector Machines (SVM)

Support Vector Machines classify by finding the widest possible street between categories. This lesson covers the margin, support vectors and the kernel idea, without the math.

View chapter overview
05Unsupervised Learning7 lessons · Intermediate · 1 free preview5.1
Unsupervised Learning

Unsupervised learning is machine learning without an answer key: the model receives data with no predefined labels and tries to discover structure on its own.

Free preview
5.2
K-Means Clustering

K-Means groups unlabeled data into K clusters by repeatedly assigning points to the nearest center and moving that center to their average.

5.3
Hierarchical Clustering

Hierarchical clustering builds a tree of nested groups instead of a fixed number of clusters. This lesson covers agglomerative merging, linkage and reading a dendrogram.

5.4
DBSCAN: Density-Based Clustering

DBSCAN groups points by how densely packed they are, finds clusters of any shape and labels sparse points as noise. This lesson covers eps, minPts and core points.

5.5
Principal Component Analysis (PCA)

PCA compresses many correlated features into a few that capture most of the variation, by finding the direction the data spreads out along the most.

5.6
Dimensionality Reduction Beyond PCA: t-SNE and UMAP

t-SNE and UMAP reduce data to two dimensions for visualization by preserving local neighborhoods, not variance. This lesson covers how they differ from PCA and how to read them.

5.7
Anomaly Detection

Anomaly detection finds the rare points that do not fit the pattern, fraud, faults, intrusions. This lesson covers the core idea, common methods and why it is hard.

View chapter overview
06Neural Networks7 lessons · Advanced · 1 free preview6.1
Neural Networks

Neural networks build predictions from simple neurons stacked in layers. This lesson covers a single neuron, forward propagation and how backpropagation trains one.

Free preview
6.2
Activation Functions: ReLU, Sigmoid and Tanh

Activation functions add the nonlinearity that lets neural networks learn curves, not just lines. This lesson covers ReLU, sigmoid and tanh and why ReLU won.

6.3
Training a Neural Network: Loss, Optimizers and Learning Rate

Training a network is a loop: measure error with a loss, send blame backward and step downhill. This lesson covers loss, backpropagation, optimizers and the learning rate.

6.4
Convolutional Neural Networks for Images

CNNs learn small filters that slide across an image to detect patterns anywhere they appear. This lesson covers convolution, pooling and why CNNs beat plain networks on images.

6.5
Recurrent Neural Networks for Sequences

RNNs process sequences one step at a time, carrying a memory of what came before. This lesson covers the hidden state, why long sequences are hard and where transformers took over.

6.6
Transfer Learning: Reusing What a Model Already Knows

Transfer learning starts from a model already trained on huge data and adapts it to your smaller task. This lesson covers feature extraction, fine-tuning and why it works so well.

6.7
An Introduction to TensorFlow and PyTorch

TensorFlow and PyTorch are the two frameworks that run deep learning. This lesson covers what they give you, tensors, autograd and GPUs and how to choose between them.

View chapter overview
07Reinforcement Learning6 lessons · Advanced · 1 free preview7.1
Reinforcement Learning

Reinforcement learning trains an agent through trial and reward rather than labels. This lesson covers the agent-environment loop, exploration and Q-learning.

Free preview
7.2
Markov Decision Processes

The MDP is the formal frame for reinforcement learning: states, actions, rewards and transitions. This lesson covers each piece and the goal of maximizing long-term reward.

7.3
Exploration vs. Exploitation

Every learning agent faces a dilemma: take the best-known option, or try something new that might be better. This lesson covers the trade-off and the epsilon-greedy strategy.

7.4
Q-Learning in Depth

Q-learning learns the value of each action in each state from experience, with no model of the world. This lesson covers the Q-table, the update rule and why it converges.

7.5
Deep Q-Networks (DQN)

DQN replaces Q-learning's table with a neural network so it can handle huge state spaces like game screens. This lesson covers the idea, plus the two tricks that made it stable.

7.6
Policy Gradient Methods

Instead of learning action values, policy gradient methods learn the policy directly and push it toward actions that earned more reward. This lesson covers the idea and why it fits continuous control.

View chapter overview
08ML Projects7 lessons · Advanced · 1 free preview8.1
Choosing the Right Algorithm for Your Problem

With dozens of algorithms available, how do you choose? This lesson gives a practical decision process based on your task, data size and need for interpretability.

Free preview
8.2
Project: Predicting House Prices with Regression

A full regression walkthrough: explore housing data, prepare features in a leak-free pipeline, compare a linear baseline against gradient boosting, and read the result in dollars.

8.3
Project: Building a Spam Classifier

A text classification walkthrough: turn emails into numeric features, train a Naive Bayes filter and judge it with precision and recall, where a false positive is the costly error.

8.4
Project: Customer Segmentation with Clustering

An unsupervised walkthrough: group customers by behavior with K-means, choose K with the elbow method and turn clusters into segments a business can actually act on.

8.5
Project: Building an Image Classifier

A deep learning walkthrough: classify images with a CNN by transfer learning from a pretrained model, using data augmentation to squeeze more from a small dataset.

8.6
Project: Building a Simple Recommendation System

A recommender walkthrough: suggest items using collaborative filtering, the idea that people who agreed before will agree again, and handle the cold-start problem it cannot solve alone.

8.7
From Notebook to Deployed Model

A trained model in a notebook helps no one. This lesson covers saving a model with its preprocessing, wrapping it in an API and the monitoring that keeps it useful as the world drifts.

View chapter overview
K to open search · Esc to close