1. Home
  2. Explore
  3. Computer Science
  4. Machine Learning Theory

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Machine Learning Theory

  • 26Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Assumptions and Terminology

What are the two core assumptions in supervised learning as described in the lecture?

26 questions

  1. 1

    What are the two core assumptions in supervised learning as described in the lecture?

    1. A

      There exists a data distribution D and all samples are independent.

    2. B

      The training set is finite and the test set infinite.

    3. C

      The true parameter is random and the estimator is unbiased.

    4. D

      The hypothesis class is finite and the learning algorithm is deterministic.

    Correct answer
    A

    There exists a data distribution D and all samples are independent.

    Explanation

    The lecture states two main assumptions: a data generating distribution D from which (x,y) pairs are sampled, and that all samples are independently drawn from D.

  2. 2

    Why is the hypothesis h^\hat{h}h^ (or θ^\hat{\theta}θ^) considered a random variable?

    1. A

      Because the true parameter θ∗\theta^*θ∗ is random.

    2. B

      Because the learning algorithm uses randomness.

    3. C

      Because the hypothesis class is infinite.

    4. D

      Because it is a deterministic function of the random training set.

    Correct answer
    D

    Because it is a deterministic function of the random training set.

    Explanation

    The training set S is a random variable; feeding it through a deterministic learning algorithm yields a random hypothesis.

  3. 3

    In the lecture, how is the true parameter θ∗\theta^*θ∗ characterized?

    1. A

      It is an unknown constant, not random.

    2. B

      It is a random variable with a prior distribution.

    3. C

      It is the output of the learning algorithm.

    4. D

      It is the expected value of the estimator.

    Correct answer
    A

    It is an unknown constant, not random.

    Explanation

    The lecture states that θ∗\theta^*θ∗ is not random; it is an unknown constant.

  4. 4

    In the parameter view of bias-variance, what does bias measure?

    1. A

      The complexity of the hypothesis class.

    2. B

      How much the hypothesis varies with different training sets.

    3. C

      Whether the sampling distribution is centered around the true parameter.

    4. D

      The difference between training error and test error.

    Correct answer
    C

    Whether the sampling distribution is centered around the true parameter.

    Explanation

    Bias checks if the sampling distribution (of θ^\hat{\theta}θ^) is centered around the true parameter θ∗\theta^*θ∗.

  5. 5

    In the parameter view of bias-variance, what does variance measure?

    1. A

      The number of parameters in the model.

    2. B

      The rate at which the estimator converges.

    3. C

      The deviation of the true parameter from the estimator.

    4. D

      The dispersion of the sampling distribution around its mean.

    Correct answer
    D

    The dispersion of the sampling distribution around its mean.

    Explanation

    Variance measures how spread out the sampling distribution is (second moment).

  6. 6

    How do underfitting and overfitting relate to bias and variance?

    1. A

      Both underfitting and overfitting are due to high bias.

    2. B

      Both underfitting and overfitting are due to high variance.

    3. C

      Underfitting corresponds to high variance and overfitting to high bias.

    4. D

      Underfitting corresponds to high bias and overfitting to high variance.

    Correct answer
    D

    Underfitting corresponds to high bias and overfitting to high variance.

    Explanation

    Underfitting (high bias) means the model cannot capture the true pattern; overfitting (high variance) means the model is too sensitive to noise.

  7. 7

    What happens to the variance of the estimator as the training set size mmm increases?

    1. A

      The variance tends to zero as mmm goes to infinity.

    2. B

      The variance first decreases then increases.

    3. C

      The variance increases because more data introduces more noise.

    4. D

      The variance remains constant regardless of mmm.

    Correct answer
    A

    The variance tends to zero as mmm goes to infinity.

    Explanation

    The lecture states that as mmm increases, variance tends to zero; the sampling distribution becomes more concentrated.

  8. 8

    What does it mean for a learning algorithm to be consistent?

    1. A

      The variance of the estimator is zero.

    2. B

      The estimator is unbiased for all sample sizes.

    3. C

      As m→∞m \to \inftym→∞, the estimator θ^\hat{\theta}θ^ converges to the true parameter θ∗\theta^*θ∗.

    4. D

      The algorithm always returns the same hypothesis.

    Correct answer
    C

    As m→∞m \to \inftym→∞, the estimator θ^\hat{\theta}θ^ converges to the true parameter θ∗\theta^*θ∗.

    Explanation

    Consistency means that as the sample size grows, the estimator tends to the true parameter.

  9. 9

    What is an unbiased estimator?

    1. A

      The estimator minimizes the training error.

    2. B

      The expected value of the estimator equals the true parameter for any mmm.

    3. C

      The estimator always returns the true parameter.

    4. D

      The variance of the estimator is zero.

    Correct answer
    B

    The expected value of the estimator equals the true parameter for any mmm.

    Explanation

    An unbiased estimator has E[θ^]=θ∗\mathbb{E}[\hat{\theta}] = \theta^*E[θ^]=θ∗ for all mmm.

  10. 10

    Which of the following is a method to reduce variance?

    1. A

      Increasing the training set size mmm.

    2. B

      Reducing regularization.

    3. C

      Using a larger hypothesis class.

    4. D

      Adding more parameters to the model.

    Correct answer
    A

    Increasing the training set size mmm.

    Explanation

    The lecture mentions that more data reduces variance; regularization also reduces variance.

  11. 11

    How does regularization affect bias and variance?

    1. A

      It typically decreases bias and increases variance.

    2. B

      It increases both bias and variance.

    3. C

      It typically increases bias and decreases variance.

    4. D

      It decreases both bias and variance.

    Correct answer
    C

    It typically increases bias and decreases variance.

    Explanation

    Regularization shrinks the hypothesis space, increasing bias but reducing variance.

  12. 12

    What is a recommended way to fight high bias?

    1. A

      Decrease the number of parameters.

    2. B

      Increase the sample size.

    3. C

      Make the hypothesis class larger.

    4. D

      Add regularization.

    Correct answer
    C

    Make the hypothesis class larger.

    Explanation

    The lecture suggests that to fight high bias, you can make H\mathcal{H}H bigger, which reduces bias but may increase variance.

  13. 13

    What is the Bayes error?

    1. A

      The error of the hypothesis learned from finite data.

    2. B

      The error of the best possible hypothesis ggg.

    3. C

      The training error of the empirical risk minimizer.

    4. D

      The error of the best hypothesis in the class H\mathcal{H}H.

    Correct answer
    B

    The error of the best possible hypothesis ggg.

    Explanation

    Bayes error is the error of the optimal hypothesis ggg, also called irreducible error.

  14. 14

    What is approximation error?

    1. A

      The difference between the Bayes error and the error of the best hypothesis in the class.

    2. B

      The difference between training error and test error.

    3. C

      The difference between the error of the best hypothesis in the class and the error of the learned hypothesis.

    4. D

      The error due to having a finite sample.

    Correct answer
    A

    The difference between the Bayes error and the error of the best hypothesis in the class.

    Explanation

    Approximation error is ϵ(h∗)−ϵ(g)\epsilon(h_*) - \epsilon(g)ϵ(h∗​)−ϵ(g), where h∗h_*h∗​ is best in class and ggg is the optimal hypothesis.

  15. 15

    What is estimation error?

    1. A

      The difference between the Bayes error and the error of the learned hypothesis.

    2. B

      The error due to the choice of hypothesis class.

    3. C

      The difference between the error of the learned hypothesis and the error of the best hypothesis in the class.

    4. D

      The variance of the estimator.

    Correct answer
    C

    The difference between the error of the learned hypothesis and the error of the best hypothesis in the class.

    Explanation

    Estimation error is ϵ(h^)−ϵ(h∗)\epsilon(\hat{h}) - \epsilon(h_*)ϵ(h^)−ϵ(h∗​), where h^\hat{h}h^ is the learned hypothesis.

  16. 16

    Which error component is also called irreducible error?

    1. A

      Bayes error.

    2. B

      Estimation error.

    3. C

      Empirical error.

    4. D

      Approximation error.

    Correct answer
    A

    Bayes error.

    Explanation

    The Bayes error (ϵ(g)\epsilon(g)ϵ(g)) is irreducible even with infinite data and the best model.

  17. 17

    What is the purpose of empirical risk minimization (ERM)?

    1. A

      To minimize the generalization error.

    2. B

      To maximize the training accuracy while ignoring test performance.

    3. C

      To find a hypothesis that minimizes the average training error.

    4. D

      To find the best possible hypothesis ggg.

    Correct answer
    C

    To find a hypothesis that minimizes the average training error.

    Explanation

    ERM selects the hypothesis that minimizes the empirical risk, i.e., training error.

  18. 18

    What does Hoeffding's inequality bound?

    1. A

      The probability that the empirical mean deviates from the true mean by more than a margin γ\gammaγ.

    2. B

      The probability that two events occur simultaneously.

    3. C

      The convergence rate of gradient descent.

    4. D

      The maximum value of a bounded random variable.

    Correct answer
    A

    The probability that the empirical mean deviates from the true mean by more than a margin γ\gammaγ.

    Explanation

    Hoeffding's inequality gives a bound on P(∣ϕ^−ϕ∣>γ)≤2exp⁡(−2γ2m)\mathbb{P}(|\hat{\phi} - \phi| > \gamma) \leq 2\exp(-2\gamma^2 m)P(∣ϕ^​−ϕ∣>γ)≤2exp(−2γ2m).

  19. 19

    What is the union bound?

    1. A

      The probability of an intersection of events is at most the product of their probabilities.

    2. B

      The probability of a union of events is at most the sum of their probabilities.

    3. C

      The sum of probabilities of disjoint events equals 1.

    4. D

      The union of independent events has probability equal to 1 minus their product.

    Correct answer
    B

    The probability of a union of events is at most the sum of their probabilities.

    Explanation

    The union bound states P(⋃iAi)≤∑iP(Ai)\mathbb{P}(\bigcup_i A_i) \leq \sum_i \mathbb{P}(A_i)P(⋃i​Ai​)≤∑i​P(Ai​).

  20. 20

    For a fixed hypothesis hhh, Hoeffding's inequality can be applied to the difference between empirical error and generalization error. What is the bound?

    1. A

      P(∣ϵ^(h)−ϵ(h)∣>γ)≤12γ2m\mathbb{P}(|\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq \frac{1}{2\gamma^2 m}P(∣ϵ^(h)−ϵ(h)∣>γ)≤2γ2m1​.

    2. B

      P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp⁡(−2γ2m)\mathbb{P}(|\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2\exp(-2\gamma^2 m)P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp(−2γ2m).

    3. C

      P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp⁡(−γm)\mathbb{P}(|\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2\exp(-\gamma m)P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp(−γm).

    4. D

      P(∣ϵ^(h)−ϵ(h)∣>γ)≤1−1m\mathbb{P}(|\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 1 - \frac{1}{m}P(∣ϵ^(h)−ϵ(h)∣>γ)≤1−m1​.

    Correct answer
    B

    P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp⁡(−2γ2m)\mathbb{P}(|\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2\exp(-2\gamma^2 m)P(∣ϵ^(h)−ϵ(h)∣>γ)≤2exp(−2γ2m).

    Explanation

    The bound is 2exp⁡(−2γ2m)2\exp(-2\gamma^2 m)2exp(−2γ2m) as per the lecture (variances are between 0 and 1 for classification error).

  21. 21

    For a finite hypothesis class of size KKK, what is the uniform convergence bound for the probability that there exists a hypothesis with ∣ϵ^(h)−ϵ(h)∣>γ|\hat{\epsilon}(h) - \epsilon(h)| > \gamma∣ϵ^(h)−ϵ(h)∣>γ?

    1. A

      P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤K/exp⁡(2γ2m)\mathbb{P}(\exists h \in \mathcal{H}: |\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq K/\exp(2\gamma^2 m)P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤K/exp(2γ2m).

    2. B

      P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤K2γ2m\mathbb{P}(\exists h \in \mathcal{H}: |\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq \frac{K}{2\gamma^2 m}P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2γ2mK​.

    3. C

      P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2Kexp⁡(−2γ2m)\mathbb{P}(\exists h \in \mathcal{H}: |\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2K \exp(-2\gamma^2 m)P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2Kexp(−2γ2m).

    4. D

      P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2exp⁡(−2γ2m)\mathbb{P}(\exists h \in \mathcal{H}: |\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2 \exp(-2\gamma^2 m)P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2exp(−2γ2m).

    Correct answer
    C

    P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2Kexp⁡(−2γ2m)\mathbb{P}(\exists h \in \mathcal{H}: |\hat{\epsilon}(h) - \epsilon(h)| > \gamma) \leq 2K \exp(-2\gamma^2 m)P(∃h∈H:∣ϵ^(h)−ϵ(h)∣>γ)≤2Kexp(−2γ2m).

    Explanation

    Using union bound over all KKK hypotheses, the bound becomes 2Kexp⁡(−2γ2m)2K \exp(-2\gamma^2 m)2Kexp(−2γ2m).

  22. 22

    What is the sample complexity required to ensure that with probability at least 1−δ1-\delta1−δ, the margin γ\gammaγ is achieved for a finite hypothesis class of size KKK?

    1. A

      m≥1γ2log⁡(Kδ)m \geq \frac{1}{\gamma^2} \log\left(\frac{K}{\delta}\right)m≥γ21​log(δK​).

    2. B

      m≥12γ2log⁡(2Kδ)m \geq \frac{1}{2\gamma^2} \log\left(\frac{2K}{\delta}\right)m≥2γ21​log(δ2K​).

    3. C

      m≥log⁡(2K/δ)γm \geq \frac{\log(2K/\delta)}{\gamma}m≥γlog(2K/δ)​.

    4. D

      m≥2Kγ2log⁡(1δ)m \geq \frac{2K}{\gamma^2} \log\left(\frac{1}{\delta}\right)m≥γ22K​log(δ1​).

    Correct answer
    B

    m≥12γ2log⁡(2Kδ)m \geq \frac{1}{2\gamma^2} \log\left(\frac{2K}{\delta}\right)m≥2γ21​log(δ2K​).

    Explanation

    Solving the bound for mmm gives m≥12γ2log⁡(2Kδ)m \geq \frac{1}{2\gamma^2} \log\left(\frac{2K}{\delta}\right)m≥2γ21​log(δ2K​).

  23. 23

    For ERM with a finite hypothesis class, the generalization error of the learned hypothesis h^\hat{h}h^ is bounded by the best-in-class error plus 2γ2\gamma2γ. What is γ\gammaγ expressed in terms of mmm, KKK, and δ\deltaδ?

    1. A

      γ=2mlog⁡(Kδ)\gamma = \sqrt{\frac{2}{m} \log\left(\frac{K}{\delta}\right)}γ=m2​log(δK​)​.

    2. B

      γ=12mlog⁡(2Kδ)\gamma = \sqrt{\frac{1}{2m} \log\left(\frac{2K}{\delta}\right)}γ=2m1​log(δ2K​)​.

    3. C

      γ=12mlog⁡(2Kδ)\gamma = \frac{1}{2m} \log\left(\frac{2K}{\delta}\right)γ=2m1​log(δ2K​).

    4. D

      γ=1mlog⁡(Kδ)\gamma = \frac{1}{m} \log\left(\frac{K}{\delta}\right)γ=m1​log(δK​).

    Correct answer
    B

    γ=12mlog⁡(2Kδ)\gamma = \sqrt{\frac{1}{2m} \log\left(\frac{2K}{\delta}\right)}γ=2m1​log(δ2K​)​.

    Explanation

    From the sample complexity formula, γ=12mlog⁡(2Kδ)\gamma = \sqrt{\frac{1}{2m} \log\left(\frac{2K}{\delta}\right)}γ=2m1​log(δ2K​)​.

  24. 24

    What does the VC dimension quantify?

    1. A

      The number of training examples needed to achieve zero training error.

    2. B

      The variance of the estimator for a given hypothesis class.

    3. C

      The capacity or expressiveness of an infinite hypothesis class.

    4. D

      The bias of the empirical risk minimizer.

    Correct answer
    C

    The capacity or expressiveness of an infinite hypothesis class.

    Explanation

    VC dimension assigns a size to infinite hypothesis classes; it measures how 'expressive' the class is.

  25. 25

    In the context of VC dimension, how does the sample complexity relate to the VC dimension ddd?

    1. A

      The required sample size is on the order of ddd to get good generalization.

    2. B

      The required sample size is equal to ddd.

    3. C

      The required sample size is exponential in ddd.

    4. D

      The required sample size is independent of ddd.

    Correct answer
    A

    The required sample size is on the order of ddd to get good generalization.

    Explanation

    The lecture states that sample complexity is generally of order the VC dimension to obtain good results.

  26. 26

    Which inequality is used in the derivation of uniform convergence for finite hypothesis classes?

    1. A

      Markov's inequality and Chebyshev's inequality.

    2. B

      Cauchy-Schwarz inequality and the central limit theorem.

    3. C

      Hoeffding's inequality and the union bound.

    4. D

      Jensen's inequality and the law of large numbers.

    Correct answer
    C

    Hoeffding's inequality and the union bound.

    Explanation

    The lecture uses Hoeffding for each hypothesis and then the union bound across them.

Question 1 of 26
Question 1 of 26

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent