1. Home
  2. Explore
  3. Computer Science
  4. Naive Bayes ML Lecture

Study methods

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

Naive Bayes ML Lecture

  • 22Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Machine Learning Fundamentals
In a probabilistic model for machine learning, the parameters are like
that can be adjusted to make good input-output predictions.

22 questions

  1. 1
    In a probabilistic model for machine learning, the parameters are like
    _____
    that can be adjusted to make good input-output predictions.
    Hint

    Think about what you adjust on a physical device to change its behavior.

    Answer

    sliders

  2. 2
    Maximum likelihood estimation (MLE) chooses parameter values that make the training data look as
    _____
    as possible.
    Hint

    The name 'likelihood' gives a clue about the objective.

    Answer

    likely

  3. 3
    MAP estimation is like MLE but includes an additional term that represents how likely you thought the parameter value was
    _____
    seeing any data.
    Hint

    This term is called the prior in Bayesian inference.

    Answer

    before

  4. 4
    For a Bernoulli parameter with a Beta prior, the MAP estimate with Laplace prior (Beta 2,2) is given by (s + 1) / (s + f +
    _____
    ), where s is number of successes and f is number of failures.
    Hint

    Laplace prior adds one imaginary success and one imaginary failure.

    Answer

    2

  5. 5
    The Laplace prior corresponds to a Beta distribution with parameters
    _____
    .
    Hint

    It's often written as Beta(α, β). For Laplace, α = β = ?

    Answer

    2,2

  6. 6
    In classification, the training data consists of input-output pairs; each pair is called a
    _____
    example because the output is provided.
    Hint

    The output (label) is given, so the data is said to be what?

    Answer

    labeled

  7. 7
    The number of features in a training dataset is the length of the
    _____
    vector for any input.
    Hint

    Inputs are represented by a bold letter usually, and its size tells the number of features.

    Answer

    X

  8. 8
    In notation, X^{i} denotes the input for the
    _____
    person in the training set.
    Hint

    The superscript i indexes over training examples.

    Answer

    ith

  9. 9
    To refer to the j-th feature of the i-th training example, we write
    _____
    .
    Hint

    Use superscript for example index, subscript for feature index.

    Answer

    X^i_j

  10. 10
    Brute Force Bayes predicts the output by taking the
    _____
    over y of P(y | x).
    Hint

    We choose the y that makes the conditional probability largest.

    Answer

    argmax

  11. 11
    In Brute Force Bayes, the denominator P(x) can be ignored in the argmax because it is a
    _____
    across different y values.
    Hint

    It doesn't depend on y, so it doesn't affect which y gives the maximum.

    Answer

    constant

  12. 12
    For Brute Force Bayes with m binary features, the number of parameters needed grows as O(
    _____
    ).
    Hint

    Each feature adds a factor of 2 combinations; think exponential growth.

    Answer

    2^m

  13. 13
    The naive Bayes assumption states that the features of X are conditionally independent given
    _____
    .
    Hint

    The independence is assumed only after conditioning on what we are predicting.

    Answer

    Y

  14. 14
    By applying the naive Bayes assumption, the joint probability P(X|Y) becomes the
    _____
    of probabilities of each feature given Y.
    Hint

    Multiplication of factors, as in ∏.

    Answer

    product

  15. 15
    With MLE, the estimate for P(Y=1) is simply the
    _____
    of training examples where Y=1.
    Hint

    Divide count of Y=1 by total number of examples.

    Answer

    fraction

  16. 16
    MAP with Laplace smoothing adds
    _____
    imaginary success and one imaginary failure to the counts for each binomial conditional probability.
    Hint

    Laplace prior adds one of each outcome.

    Answer

    one

  17. 17
    Laplace smoothing ensures that no estimated probability is ever exactly zero or
    _____
    .
    Hint

    The two extreme probabilities that can cause problems.

    Answer

    one

  18. 18
    To avoid numerical underflow when computing the product of many probabilities, it is common to work with
    _____
    probabilities instead.
    Hint

    Logarithms turn products into sums, which are more stable.

    Answer

    log

  19. 19
    In model evaluation,
    _____
    measures the fraction of all predictions that were correct.
    Hint

    It's a raw score: correct over total.

    Answer

    accuracy

  20. 20
    Precision measures how many of the items predicted as positive are actually
    _____
    .
    Hint

    It asks: out of what the model labeled as positive, how many were truly positive?

    Answer

    positive

  21. 21
    Recall measures how many of the actual positive items were correctly
    _____
    by the model.
    Hint

    It asks: out of all true positives, how many did the model catch?

    Answer

    predicted

  22. 22
    In the spam classification example, each email is represented by a vector of
    _____
    indicating whether each word appears in the email.
    Hint

    Binary indicators: 1 if word present, 0 otherwise.

    Answer

    0/1

1 of 22
Question 1 of 22

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent