Search the School
17 results for «log loss»
Lessons (5)
- Cross EntropyCross-entropy measures the average number of bits needed to encode data from p with a code designed for q; it is the loss function of classification and language models. If the data come fro…
- Loss FunctionsRegression Predicting prices or temperatures with an MSE or Huber loss. Classification Classifying images and text with cross-entropy after Softmax. Language models They are trained on the c…
- ContinuityA continuous function has no jumps or holes; we look at the conditions for continuity, the types of discontinuity, and why we prefer continuous, differentiable loss and activation functions.…
- KL DivergenceKL divergence measures the information "distance" from one distribution to another; it is non-negative and not symmetric, and it appears in VAEs, knowledge distillation and policy regulariza…
- Floating Point and Numerical StabilityThree types of error Overflow: Underflow: The result is smaller than the smallest positive number, so it is rounded to zero, which then gives \log 0 = -\infty or division by zero. Catast…
Concepts (3)
- Cross EntropyThe average surprise of the model distribution q on data coming from the true distribution p; it is the standard classification loss. −ln 0.7 ≈ 0.357 nats
- Loss FunctionA function that measures how bad the model's prediction is for one sample compared with the true value. MSE, cross-entropy
- PerplexityThe exponential of the average cross-entropy per token, used to evaluate language models. PPL = 20
Tracks (2)
- Information TheoryInformation content, entropy, cross-entropy, KL divergence and mutual information. Compute information content and entropy Compute cross-entropy and KL divergence Link cross-entropy to class…
- Exponents and LogarithmsThe laws of exponents, the exponential function, the natural logarithm and its properties, and why they appear in Softmax and in loss functions. Apply the laws of exponents and logarithms Un…
Labs (1)
Terminology (2)
Questions (4)
- Why is the 0–1 loss replaced by cross-entropy when training classifiers with gradient descent?Why is the 0–1 loss replaced by cross-entropy when training classifiers with gradient descent?
- The true class is 0 and the model gave \(\hat p = 0.25\) for class 1. Compute the binary cross-entropy in nats (four decimal places).The true class is 0 and the model gave \hat p = 0.25 for class 1. Compute the binary cross-entropy in nats (four decimal places).
- The probability of the correct class in the model output is 0.5. What is the cross-entropy in bits?The probability of the correct class in the model output is 0.5. What is the cross-entropy in bits?
- The cross-entropy \(H(p,q)\) is never less than the entropy \(H(p)\).The cross-entropy H(p,q) is never less than the entropy H(p).
