🌍 Artificial Intelligence · subject

Artificial Intelligence Machine Learning Syllabus

The Machine Learning syllabus for Artificial Intelligence in full: 6 chapters and 24 topics, every one listed below, plus 51 Machine Learning flashcards with answers.

6Chapters
24Topics
51Flashcards

Machine Learning syllabus: all 6 chapters

Expand any chapter to see its topics and sub-topics.

  1. Learning from Examples

    4 topics
    • Forms of Learning
    • Supervised Learning
    • Decision Trees
    • Linear and Logistic Regression
  2. Model Evaluation and Selection

    4 topics
    • Training, Validation, and Test Sets
    • Cross-Validation
    • Bias-Variance Tradeoff
    • Regularization
  3. Classical Learning Algorithms

    4 topics
    • K-Nearest Neighbors
    • Support Vector Machines
    • Naive Bayes Classifier
    • Ensemble Methods
  4. Neural Networks and Deep Learning

    4 topics
    • Perceptrons and Multilayer Networks
    • Backpropagation
    • Convolutional Neural Networks
    • Recurrent Networks and Transformers
  5. Unsupervised Learning

    3 topics
    • Clustering
    • Dimensionality Reduction
    • Learning with Hidden Variables and EM
  6. Reinforcement Learning

    5 topics
    • Passive Reinforcement Learning
    • Active Reinforcement Learning
    • Temporal-Difference Learning
    • Function Approximation and Policy Search
    • Deep Reinforcement Learning

Artificial Intelligence Machine Learning flashcards — 51 questions with answers

  1. What are the three main forms of machine learning based on feedback available to the learner?

    Supervised learning (learns from labeled input-output pairs), unsupervised learning (finds structure in unlabeled data), and reinforcement learning (learns from rewards/penalties via interaction with an environment).

  2. Define supervised learning and state its two principal task types.

    Learning a function $f: X \to Y$ from labeled training examples $\{(x_i, y_i)\}$. The two task types are classification (discrete $y$) and regression (continuous $y$).

  3. In a decision tree, what criterion does the ID3/C4.5 algorithm use to select the splitting attribute?

    Information gain, which chooses the attribute that maximally reduces entropy: $IG(S, A) = H(S) - \sum_{v} \frac{|S_v|}{|S|} H(S_v)$.

  4. Give the formula for the entropy of a set $S$ with class probabilities $p_i$.

    $$H(S) = -\sum_{i} p_i \log_2 p_i$$

  5. Give the formula for the Gini impurity used by CART decision trees.

    $$G = 1 - \sum_{i=1}^{K} p_i^{2}$$ where $p_i$ is the fraction of class $i$ in the node.

  6. What is the hypothesis (model) of linear regression for a feature vector $\vec{x}$?

    $$\hat{y} = \vec{w}^{\top}\vec{x} + b = \sum_{j} w_j x_j + b$$

  7. What cost function does linear regression minimize, and what is the closed-form (normal equation) solution?

    It minimizes the mean squared error $J(\vec{w}) = \frac{1}{n}\sum_i (y_i - \hat{y}_i)^2$. Closed form: $\hat{\vec{w}} = (X^{\top}X)^{-1}X^{\top}\vec{y}$.

  8. What is the logistic (sigmoid) function used in logistic regression, and what is its output range?

    $$\sigma(z) = \frac{1}{1 + e^{-z}}$$ with output in $(0, 1)$, interpreted as $P(y=1 \mid \vec{x})$.

  9. What loss function does logistic regression minimize?

    The binary cross-entropy (log loss): $$J = -\frac{1}{n}\sum_{i} \left[ y_i \log \hat{y}_i + (1 - y_i)\log(1 - \hat{y}_i) \right]$$

  10. Why can't linear regression's squared-error loss simply be reused for classification with a sigmoid output?

    Combining the sigmoid with squared error yields a non-convex cost surface with many local minima; cross-entropy restores convexity and better-behaved gradients.

  11. Distinguish the training, validation, and test sets by their purpose.

    Training set: fits model parameters. Validation set: tunes hyperparameters and selects models. Test set: gives an unbiased final estimate of generalization; used only once, at the end.

  12. What is data leakage in the context of dataset splitting?

    When information from the validation/test set (or the future) improperly influences training, e.g. scaling using statistics computed over the whole dataset, producing overoptimistic performance estimates.

  13. Describe k-fold cross-validation.

    The data is split into $k$ equal folds; the model is trained on $k-1$ folds and validated on the remaining fold, repeated $k$ times so each fold serves once as validation. The score is averaged over the $k$ runs.

  14. What is leave-one-out cross-validation (LOOCV) and its main drawback?

    A special case of $k$-fold with $k = n$ (each single example is a fold). It is nearly unbiased but computationally expensive and has high variance in its estimate.

  15. When should stratified cross-validation be used?

    For classification with imbalanced classes; stratification preserves the class proportions in each fold so estimates are not distorted by uneven splits.

  16. State the bias-variance decomposition of expected prediction error.

    $$\mathbb{E}[(y - \hat{f}(x))^2] = \text{Bias}[\hat{f}]^2 + \text{Var}[\hat{f}] + \sigma^2$$ where $\sigma^2$ is irreducible noise.

  17. Define bias and variance in the bias-variance tradeoff.

    Bias is error from wrong model assumptions (underfitting); variance is error from sensitivity to fluctuations in the training set (overfitting). Reducing one typically increases the other.

  18. How do model complexity and the bias-variance tradeoff relate?

    As complexity increases, bias decreases but variance increases. Optimal generalization occurs at the complexity minimizing total error (the U-shaped test-error curve).

  19. Write the objective of L2 (ridge) regularization for linear regression.

    $$J(\vec{w}) = \sum_i (y_i - \hat{y}_i)^2 + \lambda \sum_j w_j^{2}$$

  20. How does L1 (Lasso) regularization differ from L2 (Ridge) in effect?

    L1 penalizes $\sum_j |w_j|$ and drives some weights exactly to zero (feature selection / sparsity); L2 penalizes $\sum_j w_j^2$ and shrinks weights smoothly toward zero without eliminating them.

Show the other 31 Machine Learning flashcards
  1. What does the regularization hyperparameter $\lambda$ control?

    The strength of the penalty: larger $\lambda$ increases bias but reduces variance (more shrinkage/simpler model); $\lambda = 0$ recovers the unregularized model.

  2. How does the k-Nearest Neighbors algorithm classify a new point?

    It finds the $k$ closest training points (by a distance metric) and assigns the majority class among them (for regression, averages their values). It is a lazy, non-parametric method with no explicit training phase.

  3. Give the Euclidean and Manhattan distance formulas used in kNN.

    Euclidean: $d = \sqrt{\sum_j (x_j - x'_j)^2}$. Manhattan: $d = \sum_j |x_j - x'_j|$.

  4. What is the effect of choosing a very small vs very large $k$ in kNN?

    Small $k$ gives low bias but high variance (noisy, jagged boundaries); large $k$ gives high bias but low variance (smoother boundaries, may underfit).

  5. What does a Support Vector Machine maximize, and what are support vectors?

    It maximizes the margin, the distance between the decision hyperplane and the nearest points. The support vectors are those closest training points that lie on the margin and define the boundary.

  6. Give the margin width of an SVM with weight vector $\vec{w}$.

    The margin equals $\frac{2}{\lVert \vec{w} \rVert}$, so maximizing the margin is equivalent to minimizing $\frac{1}{2}\lVert \vec{w} \rVert^2$.

  7. What is the kernel trick in SVMs?

    Replacing inner products $\vec{x}_i^{\top}\vec{x}_j$ with a kernel $K(\vec{x}_i, \vec{x}_j)$ that computes similarity in a high-dimensional feature space without explicitly mapping the data, enabling nonlinear boundaries.

  8. Give the RBF (Gaussian) kernel formula.

    $$K(\vec{x}, \vec{x}') = \exp\!\left(-\gamma \lVert \vec{x} - \vec{x}' \rVert^2\right)$$

  9. What does the soft-margin parameter $C$ control in an SVM?

    The tradeoff between maximizing the margin and minimizing classification errors: large $C$ penalizes misclassification heavily (low bias, high variance); small $C$ allows more slack (wider margin, more tolerance).

  10. State Bayes' theorem as used by the Naive Bayes classifier.

    $$P(y \mid \vec{x}) = \frac{P(\vec{x} \mid y)\,P(y)}{P(\vec{x})}$$

  11. What is the 'naive' assumption in the Naive Bayes classifier?

    That features are conditionally independent given the class, so $P(\vec{x} \mid y) = \prod_j P(x_j \mid y)$.

  12. What is Laplace (additive) smoothing and why is it needed in Naive Bayes?

    Adding a constant $\alpha$ (often 1) to counts so no conditional probability is zero, preventing an unseen feature value from zeroing out the entire product $\prod_j P(x_j \mid y)$.

  13. Compare bagging and boosting as ensemble methods.

    Bagging trains models in parallel on bootstrap samples and averages them to reduce variance (e.g. Random Forest). Boosting trains models sequentially, each correcting the previous one's errors, primarily reducing bias (e.g. AdaBoost, Gradient Boosting).

  14. What two sources of randomness make a Random Forest?

    Bootstrap sampling of training rows (bagging) and random selection of a subset of features at each split, which decorrelates the trees.

  15. How does AdaBoost adjust training as it proceeds?

    It reweights training examples after each weak learner, increasing weights on misclassified points so subsequent learners focus on them; final prediction is a weighted vote of the weak learners.

  16. Write the equation for a single perceptron's output.

    $$y = \phi\!\left(\sum_{j} w_j x_j + b\right)$$ where $\phi$ is a step/activation function.

  17. What key limitation of a single-layer perceptron did Minsky and Papert highlight?

    It can only separate linearly separable data; it cannot represent the XOR function. Multilayer networks with nonlinear activations overcome this.

  18. Why are nonlinear activation functions necessary in multilayer networks?

    Without them, a composition of linear layers collapses to a single linear transformation, so the network could not model nonlinear relationships regardless of depth.

  19. Name three common activation functions and one property of each.

    Sigmoid $\sigma(z)=\frac{1}{1+e^{-z}}$ (saturates, vanishing gradients); $\tanh(z)$ (zero-centered, range $(-1,1)$); ReLU $\max(0, z)$ (cheap, non-saturating for $z>0$, but 'dying' units for $z<0$).

  20. What is backpropagation?

    An algorithm that computes gradients of the loss with respect to every weight by applying the chain rule backward through the network, enabling gradient-based optimization.

  21. Give the gradient-descent weight update rule using learning rate $\eta$.

    $$w \leftarrow w - \eta \frac{\partial J}{\partial w}$$

  22. What is the vanishing gradient problem?

    In deep networks, repeated multiplication of small derivatives (e.g. from saturating sigmoid/tanh) makes gradients shrink exponentially toward earlier layers, so those layers train extremely slowly. ReLU, residual connections, and careful initialization mitigate it.

  23. What three key architectural ideas define a Convolutional Neural Network?

    Local receptive fields (convolutional filters), parameter/weight sharing across spatial positions, and pooling for spatial downsampling and translation invariance.

  24. Give the output size formula for a convolution with input size $W$, filter $F$, padding $P$, and stride $S$.

    $$O = \frac{W - F + 2P}{S} + 1$$

  25. What is the purpose of a pooling layer (e.g. max pooling) in a CNN?

    To reduce spatial dimensions, lower computation and parameters, provide small-translation invariance, and enlarge the effective receptive field.

  26. What problem do Recurrent Neural Networks address, and what limits vanilla RNNs?

    They process sequential data by maintaining a hidden state $h_t = \phi(W_h h_{t-1} + W_x x_t + b)$. Vanilla RNNs suffer from vanishing/exploding gradients, limiting learning of long-range dependencies.

  27. How do LSTM/GRU cells improve over vanilla RNNs?

    They use gating mechanisms (input, forget, output gates in LSTM) and a cell state that lets gradients flow across many time steps, mitigating vanishing gradients and capturing long-term dependencies.

  28. What is the core mechanism of the Transformer architecture, and give the scaled dot-product attention formula.

    Self-attention, which relates all positions in a sequence in parallel. $$\text{Attention}(Q,K,V) = \text{softmax}\!\left(\frac{QK^{\top}}{\sqrt{d_k}}\right)V$$

  29. Why do Transformers require positional encodings?

    Self-attention is permutation-invariant and has no inherent notion of order, so positional encodings inject sequence-position information into the token representations.

  30. Describe the k-means clustering algorithm and its objective.

    Alternately assign each point to its nearest centroid and recompute centroids as cluster means, until convergence. It minimizes within-cluster variance $$J = \sum_{i}\sum_{x \in C_i} \lVert x - \mu_i \rVert^2$$

  31. Contrast k-means with hierarchical (agglomerative) clustering, and name what PCA optimizes for dimensionality reduction.

    k-means partitions data into a preset $k$ clusters via centroids; hierarchical clustering builds a dendrogram by successively merging closest clusters and needs no preset $k$. PCA reduces dimensions by projecting onto the orthogonal directions (eigenvectors of the covariance matrix) that capture maximum variance.

Artificial Intelligence Machine Learning FAQ

What is in the Artificial Intelligence Machine Learning syllabus?

Artificial Intelligence Machine Learning is split into 6 chapters: Learning from Examples, Model Evaluation and Selection, Classical Learning Algorithms, Neural Networks and Deep Learning, Unsupervised Learning and Reinforcement Learning. Together they contain 24 topics.

How many chapters are in Artificial Intelligence Machine Learning?

6 chapters, containing 24 topics. The largest chapter is Reinforcement Learning, with 5 topics.

Are there flashcards for Artificial Intelligence Machine Learning?

Yes — a 51-card Machine Learning deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.