1. Home
  2. Explore
  3. Computer Science
  4. Perceptrons and Logistic Regression

Study methods

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

Perceptrons and Logistic Regression

  • 51Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Feature Representations

What is the primary distinction between the methods discussed in this lecture and a full probabilistic model?

51 questions

  1. 1

    What is the primary distinction between the methods discussed in this lecture and a full probabilistic model?

    1. A

      They learn the decision from features to labels without modeling all variable distributions

    2. B

      They require a complete Bayes net before producing any classification decision

    3. C

      They convert labels into features but do not use numerical representations

    4. D

      They model every variable distribution but cannot make classification decisions

    Correct answer
    A

    They learn the decision from features to labels without modeling all variable distributions

    Explanation

    The methods focus directly on mapping feature vectors to class decisions rather than learning a complete probabilistic model over all variables.

  2. 2

    In an email classification system, which item is an example of a feature?

    1. A

      The complete set of model parameters learned during training

    2. B

      The probability assigned to the email after classification

    3. C

      The final decision that the email is spam

    4. D

      The number of times the word "free" appears in the email

    Correct answer
    D

    The number of times the word "free" appears in the email

    Explanation

    Word counts, misspellings, and whether the sender is a friend are examples of features used to represent an email.

  3. 3

    How can a binary image commonly be represented as a feature vector?

    1. A

      By replacing every pixel with the average intensity of the image

    2. B

      By recording only the image's final class label

    3. C

      By storing only the number of objects recognized in the image

    4. D

      By recording whether each pixel is on or off

    Correct answer
    D

    By recording whether each pixel is on or off

    Explanation

    A binary image can be represented with a vector containing 111 or 000 for each pixel, indicating whether that pixel is on or off.

  4. 4

    Which statement correctly describes grayscale image features?

    1. A

      They can only represent the number of loops found in each image

    2. B

      They cannot be used as inputs to a linear classifier

    3. C

      They can be represented by numerical intensity values such as values from 000 to 111 or 000 to 255255255

    4. D

      They must always be represented by exactly two values, 000 and 111

    Correct answer
    C

    They can be represented by numerical intensity values such as values from 000 to 111 or 000 to 255255255

    Explanation

    Grayscale pixels may be represented using values from 000 to 111, or sometimes from 000 to 255255255 in a byte representation.

  5. 5

    Which statement best describes the role of feature engineering in the described classification pipeline?

    1. A

      It determines how raw inputs are characterized before classification

    2. B

      It converts a predicted label back into the original raw input

    3. C

      It replaces the need to learn any classification weights

    4. D

      It guarantees that every class will be linearly separable

    Correct answer
    A

    It determines how raw inputs are characterized before classification

    Explanation

    Choosing features, such as word counts or image characteristics, determines how the raw input is transformed into a feature vector used for classification.

  6. 6

    Why might several synonymous words be combined into one text feature?

    1. A

      To represent related meanings together rather than treating each word as unrelated

    2. B

      To make the input independent of whether the message is an image or email

    3. C

      To prevent the classifier from using any numerical feature values

    4. D

      To ensure that every word receives a negative classification weight

    Correct answer
    A

    To represent related meanings together rather than treating each word as unrelated

    Explanation

    Combining synonyms can make the representation better reflect the shared meaning of related words.

  7. 7

    In the biological analogy for a neuron, what is the role of the dendrites?

    1. A

      They store the learned class labels permanently

    2. B

      They receive signals that serve as inputs to the neuron

    3. C

      They determine which training examples are misclassified

    4. D

      They send the neuron's final output to other neurons

    Correct answer
    B

    They receive signals that serve as inputs to the neuron

    Explanation

    Dendrites are the input channels of the biological analogy, receiving signals from sources such as the retina or other neurons.

  8. 8

    In the same analogy, what is the role of the axon?

    1. A

      It assigns a separate weight to every input feature

    2. B

      It carries the neuron's output signal to other neurons

    3. C

      It computes the probability of each possible class

    4. D

      It converts raw images into pixel-based feature vectors

    Correct answer
    B

    It carries the neuron's output signal to other neurons

    Explanation

    The axon is the output channel through which a neuron sends its signal to other neurons.

  9. 9

    What do connection weights represent in the linear-neuron analogy?

    1. A

      The relative strength or importance of different inputs

    2. B

      The probability that an input feature is observed

    3. C

      The number of training examples seen so far

    4. D

      The number of classes in the classification problem

    Correct answer
    A

    The relative strength or importance of different inputs

    Explanation

    A larger-magnitude weight means that the corresponding input has a stronger influence on the activation.

  10. 10

    How is the activation of a binary perceptron computed?

    1. A

      As the dot product of the weight vector and the feature vector

    2. B

      As the average of the class labels in the training set

    3. C

      As the product of all feature values without using weights

    4. D

      As the probability of the input under a generative model

    Correct answer
    A

    As the dot product of the weight vector and the feature vector

    Explanation

    The activation is the weighted sum w⋅f(x)w \cdot f(x)w⋅f(x), equivalently the dot product of the weights and features.

  11. 11

    How does a binary perceptron convert its activation into a class decision?

    1. A

      It predicts the positive class when the activation is positive and the negative class when it is negative

    2. B

      It predicts the class with the largest feature value rather than using the activation

    3. C

      It predicts the positive class whenever any feature value is nonzero

    4. D

      It predicts the negative class whenever the activation has a large magnitude

    Correct answer
    A

    It predicts the positive class when the activation is positive and the negative class when it is negative

    Explanation

    The perceptron uses the sign of the activation: positive indicates the positive class and negative indicates the negative class.

  12. 12

    What effect does a negative weight have when its corresponding feature value is positive?

    1. A

      It converts the feature value into a probability

    2. B

      It decreases the total activation

    3. C

      It always forces the final prediction to be positive

    4. D

      It has no effect because only positive weights matter

    Correct answer
    B

    It decreases the total activation

    Explanation

    A positive feature multiplied by a negative weight contributes a negative amount to the weighted sum.

  13. 13

    What is the geometric decision boundary of a binary linear classifier without a bias term?

    1. A

      A hyperplane through the origin that is orthogonal to the weight vector

    2. B

      A hyperplane parallel to the weight vector and unrelated to the origin

    3. C

      A sphere centered at the origin with radius equal to the activation

    4. D

      A nonlinear curve determined only by the number of features

    Correct answer
    A

    A hyperplane through the origin that is orthogonal to the weight vector

    Explanation

    The boundary occurs where w⋅f(x)=0w \cdot f(x)=0w⋅f(x)=0 and is therefore a hyperplane through the origin orthogonal to www.

  14. 14

    What is the purpose of adding a bias term to a linear classifier?

    1. A

      It allows the decision boundary to shift away from the origin

    2. B

      It removes the need to compare the activation with zero

    3. C

      It forces every feature to have the same weight

    4. D

      It converts a linear decision boundary into a nonlinear one

    Correct answer
    A

    It allows the decision boundary to shift away from the origin

    Explanation

    A bias can be represented by adding a feature that is always 111, allowing the hyperplane to move rather than remain fixed through the origin.

  15. 15

    What does a positive bias generally indicate in the spam example described?

    1. A

      The classifier must predict spam only when every feature is positive

    2. B

      The classifier requires stronger evidence before predicting the negative class

    3. C

      The classifier assumes by default that the message is not spam

    4. D

      The classifier ignores all evidence from the feature vector

    Correct answer
    B

    The classifier requires stronger evidence before predicting the negative class

    Explanation

    A positive bias favors the positive class in the example, so stronger opposing evidence is needed to make the activation negative.

  16. 16

    What does the binary perceptron do when it classifies a training example correctly?

    1. A

      It replaces the current weights with the feature vector

    2. B

      It leaves the weight vector unchanged and proceeds to the next example

    3. C

      It reverses every weight to increase the margin

    4. D

      It adds the feature vector to the weight vector regardless of the label

    Correct answer
    B

    It leaves the weight vector unchanged and proceeds to the next example

    Explanation

    A correctly classified example produces no update in the basic perceptron algorithm.

  17. 17

    What is the binary perceptron update rule for a misclassified example?

    1. A

      It updates the weights only when the true label is positive

    2. B

      It updates the weights by adding y∗f(x)y^* f(x)y∗f(x) to the current weight vector

    3. C

      It replaces the weights with the negative of the current activation

    4. D

      It updates the weights by subtracting the true label from every feature value

    Correct answer
    B

    It updates the weights by adding y∗f(x)y^* f(x)y∗f(x) to the current weight vector

    Explanation

    The update is w′=w+y∗f(x)w' = w + y^* f(x)w′=w+y∗f(x), where y∗y^*y∗ is the correct label, typically +1+1+1 or −1-1−1.

  18. 18

    Why does the perceptron update move the activation in the desired direction?

    1. A

      Because the classifier ignores the current activation during updating

    2. B

      Because the update always makes every weight positive

    3. C

      Because the change in activation includes y∗∥f(x)∥2y^* \|f(x)\|^2y∗∥f(x)∥2, whose sign is determined by the true label

    4. D

      Because every feature vector has a negative squared length

    Correct answer
    C

    Because the change in activation includes y∗∥f(x)∥2y^* \|f(x)\|^2y∗∥f(x)∥2, whose sign is determined by the true label

    Explanation

    After the update, the activation changes by y∗f(x)⋅f(x)=y∗∥f(x)∥2y^* f(x) \cdot f(x)=y^*\|f(x)\|^2y∗f(x)⋅f(x)=y∗∥f(x)∥2. Since the squared norm is nonnegative, the change has the desired sign.

  19. 19

    If a negative example is incorrectly assigned a positive activation, how does the perceptron update affect the weight vector?

    1. A

      It deletes the feature vector from the training set

    2. B

      It adds −f(x)-f(x)−f(x), making the weight vector less aligned with the example

    3. C

      It adds f(x)f(x)f(x), making the positive activation even larger

    4. D

      It changes only the bias and leaves all other weights unchanged

    Correct answer
    B

    It adds −f(x)-f(x)−f(x), making the weight vector less aligned with the example

    Explanation

    For a negative true label, y∗=−1y^*=-1y∗=−1, so the update adds −f(x)-f(x)−f(x) and reduces the example's activation.

  20. 20

    Why does the basic perceptron usually process the training data repeatedly?

    1. A

      A single training example cannot be represented by a feature vector

    2. B

      The algorithm cannot compute a dot product in one pass

    3. C

      Each update may fix one example while affecting the classification of others

    4. D

      Repeated passes are required to convert labels into probabilities

    Correct answer
    C

    Each update may fix one example while affecting the classification of others

    Explanation

    Updates change the decision boundary, so the algorithm cycles through examples until a pass produces no needed corrections or another stopping rule is used.

  21. 21

    What guarantee does the binary perceptron have when the training data is linearly separable?

    1. A

      It eventually converges to a decision boundary that separates the two classes

    2. B

      It converges even when no separating boundary exists

    3. C

      It always finds the unique maximum-margin boundary

    4. D

      It produces calibrated class probabilities for every example

    Correct answer
    A

    It eventually converges to a decision boundary that separates the two classes

    Explanation

    For linearly separable binary data, the perceptron convergence guarantee states that the algorithm eventually finds a separating boundary.

  22. 22

    What generally happens when binary training data is not linearly separable?

    1. A

      The perceptron automatically changes into logistic regression

    2. B

      The perceptron can continue making updates indefinitely without converging

    3. C

      The perceptron assigns equal probability to every class

    4. D

      The perceptron is guaranteed to find a perfect separating hyperplane

    Correct answer
    B

    The perceptron can continue making updates indefinitely without converging

    Explanation

    With nonseparable data, correcting one mistake can create another, causing the perceptron to keep bouncing between weight vectors.

  23. 23

    What does the perceptron mistake bound imply about the number of features?

    1. A

      With other factors fixed, more features can increase the number of mistakes before convergence

    2. B

      The number of features has no relationship to the convergence behavior

    3. C

      More features prevent convergence even when the data is separable

    4. D

      More features guarantee fewer mistakes because they provide more information

    Correct answer
    A

    With other factors fixed, more features can increase the number of mistakes before convergence

    Explanation

    The bound depends on the feature dimension kkk, so increasing the number of features can make convergence take longer.

  24. 24

    How does a larger separability measure δ\deltaδ affect the perceptron mistake bound?

    1. A

      A larger δ\deltaδ makes the classes less distinguishable

    2. B

      A larger δ\deltaδ eliminates the need for training examples

    3. C

      A larger δ\deltaδ generally implies fewer mistakes before convergence

    4. D

      A larger δ\deltaδ necessarily causes the algorithm to oscillate longer

    Correct answer
    C

    A larger δ\deltaδ generally implies fewer mistakes before convergence

    Explanation

    When the classes are farther apart, the problem is easier, and the bound decreases as the separation measure increases.

  25. 25

    How does the multiclass perceptron represent a problem with several classes?

    1. A

      It uses one feature vector for each class but a single scalar weight

    2. B

      It uses one binary label and discards the remaining classes

    3. C

      It uses one weight vector for each class

    4. D

      It uses a single weight vector whose entries are class labels

    Correct answer
    C

    It uses one weight vector for each class

    Explanation

    For each class yyy, the multiclass perceptron maintains a separate vector wyw_ywy​.

  26. 26

    How does a multiclass perceptron select its predicted class?

    1. A

      It chooses the class that appeared most often in the training data

    2. B

      It chooses the class with the largest score wy⋅f(x)w_y \cdot f(x)wy​⋅f(x)

    3. C

      It chooses the class with the smallest feature-vector norm

    4. D

      It chooses the class whose weight vector has the fewest nonzero entries

    Correct answer
    B

    It chooses the class with the largest score wy⋅f(x)w_y \cdot f(x)wy​⋅f(x)

    Explanation

    The score for class yyy is wy⋅f(x)w_y \cdot f(x)wy​⋅f(x), and the class with the highest score is selected.

  27. 27

    What happens in a multiclass perceptron update when the predicted class yyy is incorrect and the true class is y∗y^*y∗?

    1. A

      The algorithm changes only the feature vector and leaves all weights fixed

    2. B

      The algorithm adds f(x)f(x)f(x) to both wyw_ywy​ and wy∗w_{y^*}wy∗​

    3. C

      The algorithm subtracts f(x)f(x)f(x) from both class weight vectors

    4. D

      The algorithm subtracts f(x)f(x)f(x) from wyw_ywy​ and adds f(x)f(x)f(x) to wy∗w_{y^*}wy∗​

    Correct answer
    D

    The algorithm subtracts f(x)f(x)f(x) from wyw_ywy​ and adds f(x)f(x)f(x) to wy∗w_{y^*}wy∗​

    Explanation

    The incorrect class is made less aligned with the example, while the true class is made more aligned: wy′=wy−f(x)w_y' = w_y-f(x)wy′​=wy​−f(x) and wy∗′=wy∗+f(x)w_{y^*}'=w_{y^*}+f(x)wy∗′​=wy∗​+f(x).

  28. 28

    What is guaranteed about the scores after a multiclass perceptron update?

    1. A

      The true class is guaranteed to have the highest score immediately

    2. B

      The incorrect class score decreases and the true class score increases relative to their previous scores

    3. C

      All class scores become equal after every update

    4. D

      Every class score increases by the same amount

    Correct answer
    B

    The incorrect class score decreases and the true class score increases relative to their previous scores

    Explanation

    The update changes the incorrect score by −∥f(x)∥2-\|f(x)\|^2−∥f(x)∥2 and the true score by +∥f(x)∥2+\|f(x)\|^2+∥f(x)∥2. It nudges the scores in the correct direction but does not guarantee an immediate win.

  29. 29

    Why can the length of a multiclass weight vector affect the region assigned to its class?

    1. A

      The length has no effect because only the sign of each coordinate matters

    2. B

      A longer weight vector automatically changes the feature representation

    3. C

      A longer weight vector always has fewer features than a shorter one

    4. D

      A longer weight vector can produce larger inner products and therefore dominate more directions

    Correct answer
    D

    A longer weight vector can produce larger inner products and therefore dominate more directions

    Explanation

    Because scores are inner products, a vector with greater magnitude can achieve larger scores and occupy more of the decision space.

  30. 30

    What is the difference between separability and convergence?

    1. A

      Separability describes the data, whereas convergence describes the behavior of an algorithm run

    2. B

      Both terms refer only to the number of classes in the dataset

    3. C

      Both terms describe whether a feature is positive or negative

    4. D

      Separability describes the algorithm, whereas convergence describes the feature values

    Correct answer
    A

    Separability describes the data, whereas convergence describes the behavior of an algorithm run

    Explanation

    A dataset is separable if an appropriate boundary exists; an algorithm converges if its sequence of updates eventually stops changing.

  31. 31

    Which training strategy helps detect perceptron overfitting?

    1. A

      Continue updating until training accuracy reaches 100%100\%100% regardless of holdout accuracy

    2. B

      Stop immediately after the first training example is classified correctly

    3. C

      Use the test data after every update to select the best weights

    4. D

      Monitor accuracy on holdout data and stop when that accuracy begins to decline

    Correct answer
    D

    Monitor accuracy on holdout data and stop when that accuracy begins to decline

    Explanation

    Early stopping uses holdout accuracy as a monitoring signal and stops when it starts decreasing, indicating overfitting to the training data.

  32. 32

    What is the proper role of test data during model training?

    1. A

      It should be used to define the feature representation before training

    2. B

      It should replace the holdout set used for early stopping

    3. C

      It should remain untouched until training is complete and then be used for final evaluation

    4. D

      It should determine the weight update after every misclassified example

    Correct answer
    C

    It should remain untouched until training is complete and then be used for final evaluation

    Explanation

    Test data is reserved for estimating performance on future unseen data and should not influence training decisions.

  33. 33

    Why is a perceptron decision boundary potentially undesirable even when it makes no training errors?

    1. A

      It necessarily ignores all examples near the center of the dataset

    2. B

      It may place the boundary very close to training examples, leaving poor margin for new data

    3. C

      It always produces probabilities that are too close to 0.50.50.5

    4. D

      It cannot represent any linear boundary in feature space

    Correct answer
    B

    It may place the boundary very close to training examples, leaving poor margin for new data

    Explanation

    The perceptron only requires correct classification, so it may accept a boundary close to data points rather than preferring a safer margin.

  34. 34

    What problem does logistic regression address when the data is not linearly separable?

    1. A

      It models class membership probabilistically instead of requiring every point to be perfectly separated

    2. B

      It removes all feature values that cause classification mistakes

    3. C

      It converts the data into a generative model over all possible inputs

    4. D

      It guarantees that a nonlinear boundary will perfectly fit every training example

    Correct answer
    A

    It models class membership probabilistically instead of requiring every point to be perfectly separated

    Explanation

    Logistic regression assigns probabilities, allowing examples to lie on the less likely side of a boundary while still optimizing the overall fit.

  35. 35

    What probability does the binary sigmoid assign when the activation zzz equals zero?

    1. A

      A probability equal to the number of features

    2. B

      A probability of 000

    3. C

      A probability of 0.50.50.5

    4. D

      A probability of 111

    Correct answer
    C

    A probability of 0.50.50.5

    Explanation

    The sigmoid is σ(z)=11+e−z\sigma(z)=\frac{1}{1+e^{-z}}σ(z)=1+e−z1​. At z=0z=0z=0, it equals 12\frac{1}{2}21​.

  36. 36

    What happens to the sigmoid probability as zzz becomes very positive?

    1. A

      It approaches −1-1−1

    2. B

      It approaches 111

    3. C

      It approaches 0.50.50.5 from below and never changes

    4. D

      It becomes undefined because exponentials cannot take positive inputs

    Correct answer
    B

    It approaches 111

    Explanation

    For σ(z)=11+e−z\sigma(z)=\frac{1}{1+e^{-z}}σ(z)=1+e−z1​, a very positive zzz makes e−ze^{-z}e−z close to zero, so the probability approaches 111.

  37. 37

    What happens to the sigmoid probability as zzz becomes very negative?

    1. A

      It approaches 111

    2. B

      It alternates between 000 and 111 depending on the class label

    3. C

      It becomes exactly equal to the feature-vector norm

    4. D

      It approaches 000

    Correct answer
    D

    It approaches 000

    Explanation

    A very negative zzz makes e−ze^{-z}e−z very large, causing σ(z)\sigma(z)σ(z) to approach 000.

  38. 38

    Why is the sigmoid useful for logistic regression?

    1. A

      It maps every activation to either −1-1−1 or 111 without intermediate values

    2. B

      It maps any real-valued activation to a value between 000 and 111

    3. C

      It converts a feature vector into a hyperplane directly

    4. D

      It guarantees that all classes have equal probability

    Correct answer
    B

    It maps any real-valued activation to a value between 000 and 111

    Explanation

    The sigmoid transforms the unrestricted activation z=w⋅f(x)z=w\cdot f(x)z=w⋅f(x) into a probability-like value in the interval from 000 to 111.

  39. 39

    What objective does logistic regression use to choose its parameters?

    1. A

      It maximizes the probability of the feature vectors without considering labels

    2. B

      It chooses the first weight vector that classifies one training example correctly

    3. C

      It maximizes the sum of log probabilities of the observed labels given their features

    4. D

      It minimizes the number of features regardless of classification accuracy

    Correct answer
    C

    It maximizes the sum of log probabilities of the observed labels given their features

    Explanation

    Logistic regression uses conditional maximum likelihood, maximizing ∑ilog⁡P(yi∣f(xi),w)\sum_i \log P(y_i\mid f(x_i),w)∑i​logP(yi​∣f(xi​),w).

  40. 40

    How does the logistic regression objective differ from a generative-model objective?

    1. A

      It focuses on modeling P(y∣x)P(y\mid x)P(y∣x) rather than also modeling the distribution of xxx

    2. B

      It models only P(x)P(x)P(x) and obtains labels from an external lookup table

    3. C

      It ignores both labels and features during parameter estimation

    4. D

      It requires a separate probability model for every possible future input

    Correct answer
    A

    It focuses on modeling P(y∣x)P(y\mid x)P(y∣x) rather than also modeling the distribution of xxx

    Explanation

    Logistic regression directly optimizes the conditional label distribution, whereas a generative objective can include both P(y∣x)P(y\mid x)P(y∣x) and P(x)P(x)P(x) through the joint distribution.

  41. 41

    Why can logistic regression prefer one perfectly separating boundary over another?

    1. A

      It always chooses the boundary closest to the origin

    2. B

      It prefers boundaries that make the training labels less probable

    3. C

      It assigns higher likelihood to boundaries that place observed points farther from uncertainty

    4. D

      It chooses randomly because all separating boundaries have identical scores

    Correct answer
    C

    It assigns higher likelihood to boundaries that place observed points farther from uncertainty

    Explanation

    Points farther from the boundary receive probabilities closer to their observed labels, which can produce a higher log-likelihood and a preference for a larger effective margin.

  42. 42

    What transformation produces multiclass probabilities from class scores?

    1. A

      The softmax transformation

    2. B

      The binary threshold transformation

    3. C

      The perceptron sign transformation

    4. D

      The feature-normalization transformation

    Correct answer
    A

    The softmax transformation

    Explanation

    Multiclass logistic regression applies softmax to the class activations.

  43. 43

    Which expression correctly gives the softmax probability for class yyy?

    1. A

      P(y∣x)=zy∑y′zy′P(y\mid x)=\frac{z_y}{\sum_{y'}z_{y'}}P(y∣x)=∑y′​zy′​zy​​

    2. B

      P(y∣x)=11+e−zyP(y\mid x)=\frac{1}{1+e^{-z_y}}P(y∣x)=1+e−zy​1​ for every class independently

    3. C

      P(y∣x)=e−zyP(y\mid x)=e^{-z_y}P(y∣x)=e−zy​ without any normalization

    4. D

      P(y∣x)=ezy∑y′ezy′P(y\mid x)=\frac{e^{z_y}}{\sum_{y'}e^{z_{y'}}}P(y∣x)=∑y′​ezy′​ezy​​

    Correct answer
    D

    P(y∣x)=ezy∑y′ezy′P(y\mid x)=\frac{e^{z_y}}{\sum_{y'}e^{z_{y'}}}P(y∣x)=∑y′​ezy′​ezy​​

    Explanation

    Softmax exponentiates each class score and divides by the sum of all exponentiated scores, producing a normalized distribution.

  44. 44

    Why do softmax probabilities sum to one?

    1. A

      The softmax function assigns the same probability to every class

    2. B

      Each exponentiated score is divided by the sum of all exponentiated scores

    3. C

      The largest score is set to one and all other scores are discarded

    4. D

      Every class score is forced to equal one before exponentiation

    Correct answer
    B

    Each exponentiated score is divided by the sum of all exponentiated scores

    Explanation

    The denominator is the sum of the numerator terms, so the normalized class probabilities sum to 111.

  45. 45

    If one class has a much larger score than the others, what happens under softmax?

    1. A

      That class receives the smallest probability because exponentiation reverses order

    2. B

      The probabilities become negative because the score is large

    3. C

      All classes receive exactly the same probability

    4. D

      That class receives most of the probability mass

    Correct answer
    D

    That class receives most of the probability mass

    Explanation

    Exponentiation preserves ordering and magnifies score differences, so the largest score tends to dominate the normalized probabilities.

  46. 46

    How is multiclass logistic regression trained after applying softmax?

    1. A

      By minimizing the number of class weight vectors to one

    2. B

      By modeling only the distribution of input feature vectors

    3. C

      By selecting the first class whose score is positive

    4. D

      By maximizing the conditional log-likelihood of the observed class labels

    Correct answer
    D

    By maximizing the conditional log-likelihood of the observed class labels

    Explanation

    The parameters are chosen to maximize the sum of log probabilities assigned by softmax to the correct labels.

  47. 47

    What is the main distinction between discriminative and generative classification in this context?

    1. A

      Discriminative methods focus on P(y∣x)P(y\mid x)P(y∣x), while generative methods model the joint data distribution

    2. B

      Discriminative methods require a Bayes net, while generative methods use no probabilities

    3. C

      Discriminative methods cannot classify multiple classes, while generative methods can

    4. D

      Discriminative methods model only P(x)P(x)P(x), while generative methods ignore all feature values

    Correct answer
    A

    Discriminative methods focus on P(y∣x)P(y\mid x)P(y∣x), while generative methods model the joint data distribution

    Explanation

    Discriminative methods directly model the conditional relationship between labels and inputs, whereas generative methods model the data-generating process, often through P(x,y)P(x,y)P(x,y).

  48. 48

    Why might a generative model be useful when only classification is ultimately required?

    1. A

      Modeling the input distribution always gives a larger classification margin

    2. B

      Generative models avoid using any assumptions about the labels

    3. C

      Modeling the input distribution can sometimes regularize the parameters and reduce overfitting

    4. D

      The input distribution guarantees perfect classification on inseparable data

    Correct answer
    C

    Modeling the input distribution can sometimes regularize the parameters and reduce overfitting

    Explanation

    The additional modeling of xxx can act as a form of moderation or regularization, which may help especially when data is limited.

  49. 49

    When might the generative term be especially helpful according to the lecture?

    1. A

      When no feature representation has been constructed

    2. B

      When every class is already perfectly separated

    3. C

      When only a small amount of data is available

    4. D

      When there are infinitely many labeled examples

    Correct answer
    C

    When only a small amount of data is available

    Explanation

    With limited data, modeling additional structure through the generative term can help regularize the parameter choice.

  50. 50

    Why might a discriminative approach be preferred with a very large amount of data?

    1. A

      It can focus the available data directly on optimizing the conditional prediction task

    2. B

      It eliminates the need to estimate any parameters

    3. C

      It guarantees that the input distribution is modeled more accurately

    4. D

      It prevents the model from using any class labels

    Correct answer
    A

    It can focus the available data directly on optimizing the conditional prediction task

    Explanation

    With abundant data, directly optimizing the conditional distribution can focus modeling capacity on the classification decision of interest.

  51. 51

    Which issue does multiclass logistic regression address compared with the multiclass perceptron?

    1. A

      It replaces feature vectors with class labels before scoring

    2. B

      It can converge using probabilistic optimization even when the classes are not perfectly separable

    3. C

      It removes the need for one weight vector per class

    4. D

      It guarantees that every training example receives probability exactly 111

    Correct answer
    B

    It can converge using probabilistic optimization even when the classes are not perfectly separable

    Explanation

    Softmax probabilities and maximum likelihood provide a stable optimization objective even when no perfect multiclass separation exists.

Question 1 of 51
Question 1 of 51

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent