1. Home
  2. Explore
  3. Computer Science
  4. Probabilistic Classification

Study methods

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

Probabilistic Classification

  • 50Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Classifier Outputs

What is a point classifier, and how does it differ from a probabilistic classifier?

50 questions

  1. 1

    What is a point classifier, and how does it differ from a probabilistic classifier?

    Model answer

    A point classifier makes one prediction, such as a single class hat{v}. A probabilistic classifier assigns probabilities to all possible target classes.

    Explanation

    A point classifier gives one specific guess, whereas a probabilistic classifier expresses uncertainty across the target set.

  2. 2

    What is a list classifier?

    Model answer

    A list classifier produces an ordered list of possible target values, ranked from the most likely to the least likely.

    Explanation

    For example, an image classifier might rank pedestrian, scooter rider, and bicyclist as its top three guesses.

  3. 3

    Why might a classifier produce a list rather than one prediction?

    Model answer

    A list is useful when the classifier cannot determine the exact class but can identify several plausible classes and rank them by likelihood.

    Explanation

    The list communicates uncertainty while still identifying the classifier's best alternatives.

  4. 4

    What is the difference between a fixed-length and a variable-length list prediction?

    Model answer

    A fixed-length predictor always produces the same number of guesses, while a variable-length predictor produces more or fewer guesses depending on its uncertainty.

    Explanation

    A confident prediction may contain one or two guesses, while an uncertain prediction may contain many.

  5. 5

    Give an example of a recommendation system that uses list predictions.

    Model answer

    A recommendation system such as Amazon's can use browsing history and purchase history to produce a ranked list of items the user may want to buy.

    Explanation

    The system predicts the user's most likely interests and presents several highly ranked options.

  6. 6

    How can nearest-neighbor classification be extended to produce a list of predictions?

    Model answer

    Instead of returning only the representative closest to the embedded prediction hat{y}, return the three or more closest representatives in order.

    Explanation

    The closest representative is the top guess, the second-closest is the second guess, and so on.

  7. 7

    What is a probability distribution on a target set cal{V}?

    Model answer

    It assigns a nonnegative real number to every target value, with all assigned probabilities summing to one.

    Explanation

    For each class vvv, p(v)p(v)p(v) gives the probability associated with that class.

  8. 8

    For a target set containing rain and shine, what does p(rain)=0.15p(\text{rain})=0.15p(rain)=0.15 and p(shine)=0.85p(\text{shine})=0.85p(shine)=0.85 mean?

    Model answer

    The predicted probability of rain is 15%15\%15%, and the predicted probability of shine is 85%85\%85%.

    Explanation

    The two probabilities are nonnegative and sum to one, so they form a valid distribution.

  9. 9

    How can a probability distribution over kkk classes be represented as a vector?

    Model answer

    If the classes are v1,…,vkv_1,\ldots,v_kv1​,…,vk​, the distribution can be represented by the kkk-dimensional vector p=(p1,…,pk)p=(p_1,\ldots,p_k)p=(p1​,…,pk​), where pjp_jpj​ is the probability of vjv_jvj​.

    Explanation

    The vector contains one probability for each class.

  10. 10

    What do the vector conditions p≥0p\geq 0p≥0 and 1Tp=1\mathbf{1}^{\mathsf{T}}p=11Tp=1 express?

    Model answer

    The first condition means every component of ppp is nonnegative, and the second means that all components sum to one.

    Explanation

    Together, these conditions characterize a valid discrete probability distribution.

  11. 11

    What two mathematical viewpoints can be used to represent a probability distribution?

    Model answer

    It can be viewed as a function mapping each target class to a real number or as a vector containing the probabilities of all classes.

    Explanation

    Both forms are equivalent and are useful in different parts of probabilistic classification.

  12. 12

    What does a probabilistic classifier return for an input uuu?

    Model answer

    It returns a predicted probability distribution hat{p} over the target set, written as hat{p}=G(u).

    Explanation

    The distribution indicates how likely the classifier considers each target class for the particular input.

  13. 13

    What does hat{p}(v_i) represent in probabilistic classification?

    Model answer

    It represents the predicted probability that the target value is viv_ivi​ for the given input uuu.

    Explanation

    The classifier first produces the distribution hat{p} and then its value at viv_ivi​ gives the probability assigned to that class.

  14. 14

    Why is a probabilistic classifier described as a function that returns a function?

    Model answer

    The classifier GGG maps an input uuu to a probability distribution, and that distribution is itself a function mapping each class viv_ivi​ to a probability.

    Explanation

    Thus, evaluating G(u)G(u)G(u) gives hat{p}, and evaluating hat{p}(v_i) gives a particular class probability.

  15. 15

    How is the notation for a probabilistic classifier related to embedded and unembedded predictors?

    Model answer

    The capital GGG denotes a predictor that takes an input uuu and returns an output on the target space; in this case, the output is a probability distribution rather than a single target value.

    Explanation

    The notation extends the earlier distinction between predictors operating in the embedded space and predictors returning target-space outputs.

  16. 16

    How can a point classifier be represented as a probabilistic classifier?

    Model answer

    Assign probability 111 to the predicted class hat{v} and probability 000 to every other class.

    Explanation

    This distribution represents complete certainty about the point prediction but adds no information about uncertainty.

  17. 17

    How can a probabilistic classifier be converted into a point classifier using maximum likelihood?

    Model answer

    Choose the class that maximizes the predicted probability: hat{v}=\arg\max_v \u0001hat{p}(v).

    Explanation

    This selects the most likely class and converts the probabilistic prediction into one actionable decision.

  18. 18

    How could maximum likelihood be used to decide whether to carry an umbrella?

    Model answer

    Compare the predicted probabilities of rain and no rain; carry an umbrella if rain has the higher probability.

    Explanation

    The probabilistic forecast must be translated into an action, and choosing the more likely outcome is one possible decision rule.

  19. 19

    How can a list classifier be produced from a probabilistic classifier?

    Model answer

    Sort the target classes in descending order of their predicted probabilities.

    Explanation

    The highest-probability class becomes the first guess, followed by the next-highest probabilities.

  20. 20

    How can a decision tree be extended into a probabilistic classifier?

    Model answer

    Keep feature-and-threshold tests at the internal nodes, but place probability distributions rather than single class predictions at the leaves.

    Explanation

    A query follows a path to a leaf, whose distribution supplies the predicted class probabilities.

  21. 21

    How does a nearest-neighbor probabilistic classifier estimate class probabilities?

    Model answer

    It finds the kkk nearest neighbors of the query point and uses the empirical distribution of their classes as the predicted distribution.

    Explanation

    The fraction of neighbors belonging to each class becomes the probability assigned to that class.

  22. 22

    If three of the kkk nearest neighbors are in one class and five are in another, what probabilities does the nearest-neighbor classifier assign?

    Model answer

    It assigns probability 3/83/83/8 to the first class and 5/85/85/8 to the second class.

    Explanation

    The probabilities are the observed class fractions among the eight neighbors.

  23. 23

    In a two-class nearest-neighbor classifier, why is only one probability necessary to specify the prediction?

    Model answer

    Because the two class probabilities must sum to one, the second probability is one minus the first.

    Explanation

    For example, if the probability of blue is ppp, the probability of red is 1−p1-p1−p.

  24. 24

    What other types of predictors can be extended to probabilistic classifiers?

    Model answer

    Tree-based, nearest-neighbor, linear, and neural-network predictors can all be used to construct probabilistic classifiers.

    Explanation

    The probabilistic output can be incorporated into several common classifier architectures.

  25. 25

    How can a list classifier be evaluated using accuracy at different ranks?

    Model answer

    For each rank, measure the fraction of test examples whose true class appears within the first that many guesses.

    Explanation

    For example, top-one, top-two, and top-three accuracy measure whether the true class appears among the first one, two, or three predictions.

  26. 26

    Why is top-three accuracy at least as large as top-one accuracy?

    Model answer

    Allowing three guesses includes every case counted by top-one accuracy and possibly additional cases where the true class is ranked second or third.

    Explanation

    Expanding the accepted list cannot remove previously successful predictions.

  27. 27

    How can a list classifier be evaluated with a rank-based score?

    Model answer

    Give a test example three points if its true class is the first guess, two points if it is the second, and one point if it is the third, then sum the scores.

    Explanation

    This rewards correct predictions more highly when they appear earlier in the ranked list.

  28. 28

    What information is available for evaluating a probabilistic classifier on a test data set?

    Model answer

    For each test input, there is a true class viv_ivi​ and a predicted probability distribution hat{p}_i over the possible classes.

    Explanation

    Evaluation compares the probability assigned to the actual observed class with the quality of the overall predictions.

  29. 29

    What probability behavior indicates that a probabilistic classifier is well calibrated to observed outcomes?

    Model answer

    It assigns high probability to classes that actually occur and low probability to classes that do not occur.

    Explanation

    For example, on days when it rains, a good weather predictor should assign a high probability to rain.

  30. 30

    Define the likelihood of predicted distributions for independent observations.

    Model answer

    For observations (ui,vi)(u_i,v_i)(ui​,vi​) with predicted distributions hat{p}_i, the likelihood is ∏i=1n0˘001hatpi(vi)\prod_{i=1}^{n}\u0001hat{p}_i(v_i)∏i=1n​0˘001hatpi​(vi​).

    Explanation

    Each factor is the probability assigned to the observed class, and independence makes the probability of the full sequence equal to their product.

  31. 31

    What is the distinction between probability and likelihood in this setting?

    Model answer

    Probability refers to the chance of observing particular outcomes under fixed distributions, while likelihood views the same quantity as a measure of how plausible the predicted distributions are.

    Explanation

    The numerical expression is the same, but the interpretation changes depending on whether outcomes or distributions are being evaluated.

  32. 32

    Why is the logarithm of the likelihood often used instead of the likelihood itself?

    Model answer

    The logarithm converts the product of individual probabilities into a sum, making the quantity easier to compute and analyze.

    Explanation

    Products over many observations can be inconvenient, while sums are more numerically and mathematically manageable.

  33. 33

    Define the negative log likelihood for independent test observations.

    Model answer

    The negative log likelihood is −log⁡(∏i=1n0˘001hatpi(vi))=−∑i=1nlog⁡0˘001hatpi(vi)-\log\left(\prod_{i=1}^{n}\u0001hat{p}_i(v_i)\right)=-\sum_{i=1}^{n}\log\u0001hat{p}_i(v_i)−log(∏i=1n​0˘001hatpi​(vi​))=−∑i=1n​log0˘001hatpi​(vi​).

    Explanation

    The negative sign turns the quantity into a loss that should be minimized.

  34. 34

    Why is a smaller negative log likelihood better?

    Model answer

    A smaller negative log likelihood corresponds to a larger likelihood, meaning the classifier assigned higher probabilities to the observed outcomes.

    Explanation

    The negative logarithm reverses the preference: high likelihood produces low negative log likelihood.

  35. 35

    Why should negative log likelihood be averaged over the number of observations?

    Model answer

    The unnormalized negative log likelihood tends to grow with the number of data points, so dividing by nnn allows fair comparisons across data sets of different sizes.

    Explanation

    The average negative log likelihood measures typical performance per observation.

  36. 36

    Write the average negative log likelihood for nnn observations.

    Model answer

    It is −1n∑i=1nlog⁡0˘001hatpi(vi)-\frac{1}{n}\sum_{i=1}^{n}\log\u0001hat{p}_i(v_i)−n1​∑i=1n​log0˘001hatpi​(vi​).

    Explanation

    This is the standard performance metric used to compare probabilistic classifiers on test data.

  37. 37

    What is the best constant probabilistic classifier under average negative log likelihood?

    Model answer

    It is the empirical distribution qqq of the observed target classes.

    Explanation

    The optimal constant predictor assigns each class its observed fraction in the data.

  38. 38

    How is the empirical distribution qqq of a data set defined?

    Model answer

    For each class vvv, q(v)q(v)q(v) is the fraction of observations whose target value equals vvv.

    Explanation

    It is obtained by counting each class and dividing by the total number of observations.

  39. 39

    How does the best constant probabilistic classifier compare with the best constant predictors for square and absolute loss?

    Model answer

    The best constant predictor is the mean for square loss, the median for absolute loss, and the empirical distribution for average negative log likelihood.

    Explanation

    Each loss function leads to a different summary of the observed target values.

  40. 40

    How can the average negative log likelihood be rewritten as a sum over classes instead of observations?

    Model answer

    If qjq_jqj​ is the empirical fraction of class vjv_jvj​, then the average negative log likelihood is −∑j=1kqjlog⁡0˘001hatpj-\sum_{j=1}^{k}q_j\log\u0001hat{p}_j−∑j=1k​qj​log0˘001hatpj​.

    Explanation

    All observations in the same class contribute the same logarithmic term, so their contributions can be grouped by class.

  41. 41

    What is the cross entropy of an empirical distribution qqq relative to a predicted distribution hat{p}?

    Model answer

    The cross entropy is H(q,0˘001hatp)=−∑j=1kqjlog⁡0˘001hatpjH(q,\u0001hat{p})=-\sum_{j=1}^{k}q_j\log\u0001hat{p}_jH(q,0˘001hatp)=−∑j=1k​qj​log0˘001hatpj​.

    Explanation

    For classification, this cross entropy equals the average negative log likelihood.

  42. 42

    What is the entropy of a probability distribution ppp?

    Model answer

    Its entropy is H(p)=−∑j=1kpjlog⁡pjH(p)=-\sum_{j=1}^{k}p_j\log p_jH(p)=−∑j=1k​pj​logpj​.

    Explanation

    Entropy is the special case of cross entropy in which the predicted and reference distributions are the same.

  43. 43

    Where are entropy and cross entropy used?

    Model answer

    They are widely used in coding theory, information theory, and machine learning.

    Explanation

    They are fundamental measures for describing probability distributions and evaluating probabilistic predictions.

  44. 44

    Define the Kullback–Leibler divergence between distributions qqq and ppp.

    Model answer

    The divergence is DKL(q∥p)=H(q,p)−H(q)D_{\mathrm{KL}}(q\|p)=H(q,p)-H(q)DKL​(q∥p)=H(q,p)−H(q).

    Explanation

    It measures the difference between the cross entropy of qqq relative to ppp and the entropy of qqq.

  45. 45

    Why does minimizing cross entropy over ppp give the same solution as minimizing Kullback–Leibler divergence over ppp?

    Model answer

    Because H(q)H(q)H(q) does not depend on ppp, subtracting it only shifts the objective by a constant.

    Explanation

    Therefore, H(q,p)H(q,p)H(q,p) and DKL(q∥p)D_{\mathrm{KL}}(q\|p)DKL​(q∥p) have the same minimizing distribution.

  46. 46

    State the nonnegativity property of Kullback–Leibler divergence.

    Model answer

    For probability distributions qqq and ppp, DKL(q∥p)≥0D_{\mathrm{KL}}(q\|p)\geq 0DKL​(q∥p)≥0.

    Explanation

    This means the divergence behaves as a nonnegative measure of dissimilarity between distributions.

  47. 47

    When is the Kullback–Leibler divergence equal to zero?

    Model answer

    It is zero when p=qp=qp=q.

    Explanation

    When the two distributions are identical, their cross entropy equals the entropy of the reference distribution.

  48. 48

    How can the nonnegativity of Kullback–Leibler divergence be shown using the logarithm inequality?

    Model answer

    Using log⁡x≤x−1\log x\leq x-1logx≤x−1 with x=pj/qjx=p_j/q_jx=pj​/qj​ shows that the divergence is bounded below by ∑jpj−∑jqj=0\sum_j p_j-\sum_j q_j=0∑j​pj​−∑j​qj​=0.

    Explanation

    Both sums equal one because ppp and qqq are probability distributions, establishing DKL(q∥p)≥0D_{\mathrm{KL}}(q\|p)\geq0DKL​(q∥p)≥0.

  49. 49

    What distribution minimizes the cross entropy H(q,p)H(q,p)H(q,p) over all probability distributions ppp?

    Model answer

    The minimizing distribution is p=qp=qp=q, the empirical distribution of the data.

    Explanation

    Since H(q,p)=DKL(q∥p)+H(q)H(q,p)=D_{\mathrm{KL}}(q\|p)+H(q)H(q,p)=DKL​(q∥p)+H(q) and the divergence is minimized at zero when p=qp=qp=q, the empirical distribution is optimal.

  50. 50

    What is the final performance measure used to judge a probabilistic classifier?

    Model answer

    A probabilistic classifier is judged by its average log likelihood, equivalently its average negative log likelihood when treated as a loss, on test data.

    Explanation

    The measure evaluates whether the classifier assigns high probability to the classes that actually occur.

1 of 50
Question 1 of 50

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent