Try the questions before opening the answer checks. Use the Study contents to review anything you miss.

A · ML basics and Bayes

  1. Explain the ML pipeline from raw data to final evaluation. Give one example of leakage and how to prevent it.
  2. Derive the MAP decision from Bayes’ rule and explain when it agrees with maximum likelihood.
  3. For two equally likely classes, vocab size 2, and word counts and for “offer” and “meeting”, use Laplace smoothing to classify “offer offer meeting”.

B · ANN and backpropagation

  1. Give perceptron parameters for AND and OR. Explain why XOR needs a nonlinear network.
  2. For , two scalar weights initially 1, zero biases, sigmoid hidden and output activations, target 1 and BCE, compute the forward pass, both weight gradients, and both updated weights at .
  3. Explain how momentum and early stopping affect training. State which split selects the checkpoint.

C · HMM

  1. Draw a two-state HMM and define . State the two conditional independence assumptions.
  2. With , transition rows and emission probabilities for symbol of , compute by the forward algorithm.
  3. Explain what Viterbi, forward–backward, and Baum–Welch each return or estimate.

D · CRF

  1. Write the linear-chain CRF score, probability, and partition function. Give one token feature and one transition feature.
  2. For the sequences PP, PL, LP, LL with total scores , compute , the best sequence, its probability, and the marginal probability that the second label is L.
  3. If PL is the gold sequence, calculate the unregularized gradient for the P→L transition weight. Explain how to obtain the expected count for longer sequences.

E · Hopfield, RBM, and autoencoders

  1. Store with unscaled Hebbian weights. Starting from , update neuron 2 and calculate the energy change.
  2. Compare Hopfield recall, an RBM Gibbs step, and an autoencoder training step. Name what gets updated in each.

F · Training, CNNs, and RNNs

  1. Given 130 examples and batch size 32, find the updates per epoch when the partial batch is kept. Training loss falls for five epochs and validation loss is . Which checkpoint would you restore?
  2. For a input, eight filters, stride 1, no padding, and one bias per filter, find the output shape and parameter count. Explain how changing the previous hidden state affects an RNN with the same current input.

G · Logistic regression, LDA, and SVM

  1. For , compute the logistic probability and log loss when .
  2. State Fisher’s criterion and explain what happens to a threshold when you rescale its projection direction by a positive constant.
  3. For in canonical SVM scaling, give the unit normal, both margin equations, and the total width.

H · Reinforcement learning

  1. Contrast a contextual bandit and an MDP. Give an example where the choice affects future states.
  2. Update after reward 2 with , , and . Explain how the target would change if the next state were terminal.

Answer checks

QuestionCheck your result
ADefine the target and metric, split the data, fit preprocessing and model parameters on training data, select using validation, and evaluate on the held-out test set. Fitting transforms before the split can leak test information. Under uniform priors MAP equals ML. The class scores are and , so choose class 1.
BAND uses bias and OR with both weights 1. XOR has no single linear boundary. OR and NAND hidden units followed by AND can represent it. Hidden output , predicted output , gradients and . Updated weights are about and . Momentum accumulates a running direction from past gradients. Early stopping selects the lowest validation-loss checkpoint.
CDraw arrows from each state to the next state and to the current observation. gives initial probabilities, transitions, and emissions. The next state depends only on the current state, and each observation depends only on its own state. and give . Viterbi returns the best complete state path, forward–backward gives posterior marginals, and Baum–Welch estimates parameters from expected counts.
DSum token and transition scores to get . The probability is , where sums over all paths. A capitalized word tagged as a person is a token feature. P followed by L is a transition feature. . Best is PL with probability . The node marginal is . The P→L gradient is . Sum pairwise marginals over edges for longer sequences.
EWeights into neuron 2 are both , so its field is . The flip is and . Recall changes Hopfield states, an RBM Gibbs step samples states, and autoencoder training changes parameters by backpropagating reconstruction loss.
FFive updates if you retain the partial batch. Restore epoch 3. CNN output , with parameters. The term changes the next hidden activation.
G and loss . Fisher maximizes projected between-class separation relative to within-class scatter. Scale the threshold by the same positive factor as the direction. The unit normal is , margins satisfy , and full width is .
HA contextual bandit chooses an action for its immediate expected reward given the current context. In an MDP an action can change the next state, such as moving a robot. The target is and the updated value is . If terminal, the target is 2 and the new value is .

For a short session, choose two calculations from different units. Check your work, then redo both from memory.

The CRF calculations above include a complete answer check.