Neural Networks: Classification and Loss Functions

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/41

encourage image

There are no tags or description

Looks like no tags are added yet.

42 Terms

1
New cards

What is a loss function?

A function measuring the discrepancy between the model's predictions and actual outcomes.

2
New cards

What loss function is commonly used for continuous regression outcomes?

Mean squared error.

3
New cards

What is binary classification?

Predicting an outcome belonging to one of two possible classes, commonly encoded as 0 and 1.

4
New cards

Why is sigmoid useful for binary classification?

It converts any real-valued score into a number between zero and one that can represent a probability.

5
New cards

What does p̂ represent in binary classification?

The predicted probability that Y = 1 conditional on the inputs.

6
New cards

What is the predicted probability that Y = 0?

1−p̂.

7
New cards

What is a logit?

A raw model score before conversion into a probability; in binary logistic regression it is the log odds.

8
New cards

What is cross-entropy loss for one binary observation?

−[y log(p̂) + (1−y)log(1−p̂)].

9
New cards

What does binary cross-entropy simplify to when y = 1?

−log(p̂).

10
New cards

What does binary cross-entropy simplify to when y = 0?

−log(1−p̂).

11
New cards

What happens to binary cross-entropy when the probability assigned to the correct class approaches one?

The loss approaches zero.

12
New cards

What happens to cross-entropy when the probability assigned to the correct class approaches zero?

The loss approaches infinity.

13
New cards

Why does cross-entropy heavily penalise confident incorrect predictions?

The negative logarithm becomes very large when its probability argument approaches zero.

14
New cards

What is the likelihood contribution of one binary observation?

p̂ʸ(1−p̂)^(1−y).

15
New cards

What is the likelihood contribution if y = 1?

p̂.

16
New cards

What is the likelihood contribution if y = 0?

1−p̂.

17
New cards

What is the full binary likelihood for independent observations?

The product of the individual Bernoulli likelihood contributions.

18
New cards

How do we obtain log-likelihood from likelihood?

Take the logarithm, converting the product into a sum.

19
New cards

Write the binary log-likelihood contribution.

y log(p̂) + (1−y)log(1−p̂).

20
New cards

What is the relationship between binary cross-entropy and log-likelihood?

Cross-entropy is negative log-likelihood, or negative average log-likelihood when averaged across observations.

21
New cards

Is cross-entropy the negative of likelihood?

No. It is the negative of log-likelihood. See Neural Networks recap section 10.

22
New cards

Why does maximising log-likelihood give the same coefficients as maximising likelihood?

The logarithm is strictly increasing, so it preserves the ordering of objective values.

23
New cards

Why does minimising cross-entropy give the same coefficients as maximising log-likelihood?

Multiplying an objective by −1 converts maximisation into minimisation.

24
New cards

Why might the cross-entropy equation contain 1/N?

It is being averaged across N observations rather than summed.

25
New cards

Does dividing cross-entropy by N change its minimising coefficients?

No. Positive rescaling does not change the minimiser.

26
New cards

What is the difference between summed and expected cross-entropy?

Summed cross-entropy adds sample losses; expected cross-entropy averages loss over the population distribution.

27
New cards

What is multiclass classification?

Predicting which of more than two mutually exclusive categories an observation belongs to.

28
New cards

How many logits are normally produced for K-class softmax classification?

K logits, one for each possible class.

29
New cards

What is the softmax function?

A transformation converting a vector of logits into a probability distribution across classes.

30
New cards

Write the softmax probability for class k.

pₖ = exp(zₖ)/Σⱼexp(zⱼ).

31
New cards

What properties do softmax probabilities satisfy?

Each is positive and they sum to one.

32
New cards

Why does the largest logit correspond to the largest softmax probability?

Exponentiation preserves ordering and every class shares the same denominator.

33
New cards

Do logits have to be between zero and one?

No. Logits are unrestricted real-valued scores.

34
New cards

What happens if all logits are equal?

Every class receives probability 1/K.

35
New cards

Does adding the same constant to every softmax logit change its probabilities?

No. The common exponential factor cancels between numerator and denominator.

36
New cards

What is the multiclass cross-entropy loss for one observation?

−Σₖ yₖlog(pₖ), where y is a one-hot vector identifying the correct class.

37
New cards

What does multiclass cross-entropy simplify to?

−log(p_true), the negative logarithm of the probability assigned to the actual class.

38
New cards

What is one-hot encoding of a class label?

A vector with a one in the position of the true class and zeros elsewhere.

39
New cards

What is MNIST?

A dataset of handwritten digit images used for ten-class classification, with labels 0 through 9.

40
New cards

How many output logits would an ordinary softmax MNIST classifier have?

Ten, one for each digit.

41
New cards

How does a softmax classifier select its predicted class?

Choose the class with the greatest predicted probability, equivalently the greatest logit.

42
New cards

[Derivation B3] Show that minimising binary cross-entropy is equivalent to maximising likelihood.

See Neural Networks recap section 10 and screenshot B3.