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.
Every lesson, grouped by path. Pick a level to narrow it, or dive into the path you want.
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.
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.
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.
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.
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.
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.
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.
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.
A practical, step-by-step setup: installing Python, using pip, isolating projects with virtual environments and getting NumPy, Pandas, Matplotlib and scikit-learn installed.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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².
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.
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.
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.
Logistic regression classifies by predicting a probability. This lesson explains the sigmoid curve, the decision threshold and why the name still says "regression."
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.
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.
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.
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.
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.
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.
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.
K-Means groups unlabeled data into K clusters by repeatedly assigning points to the nearest center and moving that center to their average.
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.
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.
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.
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.
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.
Neural networks build predictions from simple neurons stacked in layers. This lesson covers a single neuron, forward propagation and how backpropagation trains one.
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.
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.
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.
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.
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.
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.
Reinforcement learning trains an agent through trial and reward rather than labels. This lesson covers the agent-environment loop, exploration and Q-learning.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.