Logarithmic Loss - aragorn/home GitHub Wiki
-
https://www.kaggle.com/wiki/LogarithmicLoss
- The logarithm of the likelihood function for a Bernoulli random distribution.
- λ² λ₯΄λμ΄ μμ λΆν¬μ λν μ°λ ν¨μμ λ‘κ·Έ
- In plain English, this error metric is used where contestants have to predict that something is true or false with a probability (likelihood) ranging from definitely true (1) to equally true (0.5) to definitely false(0).
- μ΄λ€ κ°μ΄ μ°ΈμΈμ§ λλ κ±°μ§μΈμ§ μμΈ‘νλ©΄μ, νμ€ν μ°ΈμΈμ§, μ°Έ λλ κ±°μ§μΌ νλ₯ μ΄ λμΌνμ§, λλ νμ€ν κ±°μ§μΈμ§ νλ₯ κ°μΌλ‘ μμΈ‘ν λ, μ΄ μ€λ₯ μΈ‘μ κΈ°μ€μ μ¬μ©νλ€.
- μ€λ₯μ λν΄ λ‘κ·Έλ₯Ό μ μ©νλ κ²μ νμ νκ±°λ νλ¦° κ²½μ° λͺ¨λμ λν΄ κ°νκ² μ²λ²νλ ν¨κ³Όκ° μλ€. μ΅μ μ κ²½μ°, 무μμΈκ° μ°ΈμΈ κ²μΌλ‘ νμ νλ μμΈ‘μ νμΌλ μ€μ λ‘λ κ·Έκ²μ΄ κ±°μ§μΈ κ²½μ°, μ€λ₯ μ μμ 무νλμ κ°μ μΆκ°νκ² λλ©°, λ€λ₯Έ μμΈ‘κ°μ λͺ¨λ 무μλ―Ένκ² λ§λ λ€.
-
General log loss
where N is the number of examples, M is the number of classes, andis a binary variable indicating whether class j was correct for example i.
-
When the number of classes is 2 (M=2)
-
https://www.quora.com/What-is-an-intuitive-explanation-for-the-log-loss-function
The log loss function is simply the objective function to minimize, in order to fit a log linear probability model to a set of binary labeled examples. Recall that a log linear model assumes that the log-odds of the conditional probability of the target given the features is a weighted linear combination of features . These weights are the parameters of the model which we'd like to learn.
Convexity
MSE(Mean Squared Error)λ logistic function μ weight μ λν΄ convex κ° μλλ€.
- Cost function for logistic regression
- If we use this function for logistic regression this is a non-convex function for parameter optimization.
...
- Why do we chose this function when other cost functions exist?
- This cost function can be derived from statistics using the principle of maximum likelihood estimation.
- Note this does mean there's an underlying Gaussian assumption relating to the distribution of features.
- Also has the nice property that it's convex.
- How to prove that logistic loss is a convex function? https://math.stackexchange.com/questions/2458438/convexity-of-logistic-loss
- Why is the error function minimized in logistic regression convex? http://mathgotchas.blogspot.kr/2011/10/why-is-error-function-minimized-in.html
- Why is a cross-entropy loss function convex for logistic regression, but not for neural networks? https://www.quora.com/Why-is-a-cross-entropy-loss-function-convex-for-logistic-regression-but-not-for-neural-networks