🌍 freeCodeCamp · subject
freeCodeCamp Machine Learning with Python Syllabus
Every chapter and topic of Machine Learning with Python examined in freeCodeCamp — 5 chapters, 14 topics, plus 50 flashcards written against it.
Machine Learning with Python syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Machine Learning with Python in freeCodeCamp, not a summary of it.
-
Machine Learning Foundations
2 topics- Supervised vs Unsupervised Learning
- Training and Evaluation
-
TensorFlow and Neural Networks
3 topics- Tensors and Operations
- Building Neural Networks
- Convolutional Neural Networks
-
Natural Language Processing
2 topics- Text Preprocessing
- Recurrent Neural Networks
-
Reinforcement Learning
2 topics- Q-Learning
- Markov Decision Processes
-
Certification Projects
5 topics- Rock Paper Scissors
- Cat and Dog Image Classifier
- Book Recommendation Engine using KNN
- Linear Regression Health Costs Calculator
- Neural Network SMS Text Classifier
Machine Learning with Python flashcards for freeCodeCamp
25 of 50 cards from the Machine Learning with Python deck — real questions with worked answers.
What is supervised learning?
Learning from labeled data: each training example is an input paired with a correct output, and the model learns a mapping $f: X \to Y$ to predict labels for new inputs (e.g., classification, regression).
What is unsupervised learning?
Learning patterns from unlabeled data with no correct outputs given; the algorithm finds structure on its own, e.g., clustering (K-Means) or dimensionality reduction.
What is the difference between classification and regression?
Classification predicts a discrete class label (spam vs ham, cat vs dog); regression predicts a continuous numeric value (e.g., insurance cost in dollars).
How does reinforcement learning differ from supervised and unsupervised learning?
An agent interacts with an environment and learns a policy that maximizes cumulative reward. There are no labeled examples (unlike supervised) but there is explicit feedback via a reward signal (unlike unsupervised).
Why is a dataset split into separate training and testing sets?
The model fits its parameters on the training set; the test set contains unseen data, so evaluating on it measures generalization rather than memorization.
What is the purpose of a validation set?
A held-out subset used during training to tune hyperparameters and monitor overfitting after each epoch, keeping the test set reserved for the final unbiased evaluation.
Define overfitting and underfitting.
Overfitting: the model fits training data too closely (including noise) — high training accuracy but poor test accuracy. Underfitting: the model is too simple to capture the underlying pattern — poor accuracy on both sets.
What is an epoch, and what happens if you train for too many epochs?
One epoch is one complete pass of the entire training dataset through the model. Too many epochs cause overfitting: training loss keeps falling while validation loss starts rising.
What is a tensor?
A generalization of vectors and matrices to arbitrary dimensions: a rank-0 tensor is a scalar, rank-1 a vector, rank-2 a matrix, and higher ranks are $n$-dimensional arrays. Tensors are the basic data objects in TensorFlow.
What are the rank (degree) and shape of a tensor?
Rank is the number of dimensions (axes) of the tensor; shape lists the number of elements along each dimension. Example: a tensor of shape $(2, 3)$ has rank 2, with 2 rows and 3 columns.
What does reshaping a tensor do, and what must be preserved?
Reshaping rearranges the elements into a new shape (e.g., tf.reshape). The total number of elements must stay the same: shape $(2, 3)$ can become $(3, 2)$ or $(6,)$ since $2 \times 3 = 6$.
In TensorFlow, what is the difference between a Variable and a constant tensor?
A tf.Variable is mutable — its value can be changed during training (used for weights and biases); constant tensors are immutable once created.
What computation does a single dense-layer neuron perform?
A weighted sum of its inputs plus a bias, passed through an activation: $y = f\left(\sum_{i} w_{i} x_{i} + b\right)$, where $w_{i}$ are weights, $b$ is the bias, and $f$ is the activation function.
Why do neural networks need nonlinear activation functions?
Without them, stacked layers collapse into a single linear transformation, so the network could only model linear relationships. Nonlinearities (ReLU, sigmoid, tanh) let networks approximate complex functions.
Give the formulas for the ReLU and sigmoid activation functions.
ReLU: $f(x) = \max(0, x)$. Sigmoid: $\sigma(x) = \frac{1}{1 + e^{-x}}$, which squashes any input into $(0, 1)$.
What does the softmax activation do, and where is it used?
It converts a vector of raw scores into a probability distribution: $\text{softmax}(z_{i}) = \frac{e^{z_{i}}}{\sum_{j} e^{z_{j}}}$. It is used on the output layer of multi-class classifiers so outputs sum to 1.
What roles do the loss function and the optimizer play in training a neural network?
The loss function (e.g., cross-entropy, MSE) measures how far predictions are from true values; the optimizer (e.g., SGD, Adam) adjusts weights to minimize that loss using gradients computed by backpropagation.
What is gradient descent?
An optimization algorithm that repeatedly updates parameters in the direction of steepest loss decrease: $w \leftarrow w - \alpha \frac{\partial L}{\partial w}$, where $\alpha$ is the learning rate.
What is backpropagation?
The algorithm that computes the gradient of the loss with respect to every weight by applying the chain rule backward through the network, enabling gradient descent to update all layers.
What is the key advantage of a convolutional layer over a dense layer for images?
Convolutions detect local patterns with small shared filters slid across the image, so learned features are translation-invariant and require far fewer parameters than fully connected layers.
What is a filter (kernel) in a CNN, and what does it produce?
A small matrix of trainable weights (e.g., $3 \times 3$) slid over the input; at each position it computes a dot product with the underlying patch, producing a feature map that highlights where its pattern occurs.
What do stride and padding control in a convolution?
Stride is how many pixels the filter moves each step (larger stride = smaller output). Padding ('same') adds a border of zeros so the output keeps the input's spatial size; 'valid' uses no padding and shrinks the output.
What does a max pooling layer do?
It downsamples each feature map by taking the maximum value in each window (typically $2 \times 2$), reducing spatial dimensions and computation while keeping the strongest activations.
Describe the typical architecture of a CNN image classifier.
Stacked Conv2D + ReLU + MaxPooling blocks extract increasingly abstract features, then a Flatten layer converts feature maps to a vector, followed by Dense layers and a final classification output (sigmoid or softmax).
What is data augmentation and why is it used in image classification?
Generating modified copies of training images (rotations, flips, shifts, zooms) to artificially enlarge the dataset, which reduces overfitting and improves generalization when data is limited.
Planning Machine Learning with Python for freeCodeCamp
Machine Learning with Python is about 10% of the freeCodeCamp syllabus by topic count — 14 of 145 topics, spread over 5 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 10 hours.
The heaviest chapters are Certification Projects (5 topics), TensorFlow and Neural Networks (3 topics), Machine Learning Foundations (2 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
Machine Learning with Python (freeCodeCamp) FAQ
What is in the freeCodeCamp Machine Learning with Python syllabus?
Machine Learning with Python is split into 5 chapters — Machine Learning Foundations, TensorFlow and Neural Networks, Natural Language Processing, Reinforcement Learning and Certification Projects, containing 14 topics and 0 sub-topics in total.
How many chapters are there in Machine Learning with Python for freeCodeCamp?
5 chapters. Machine Learning with Python accounts for about 10% of the topics in the whole freeCodeCamp syllabus (14 of 145).
How long should I spend on Machine Learning with Python for freeCodeCamp?
Budget around 10 hours for a first pass through Machine Learning with Python — about 45 minutes per topic plus 12 minutes per sub-topic across its 14 topics. Add revision cycles on top.
Are there flashcards for freeCodeCamp Machine Learning with Python?
Yes — a 50-card Machine Learning with Python deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.