Essential Math, Editors Pick, Mathematics, Data Science, Machine Learning.
Q(x).(Image by author) Let’s manually calculate the cross-entropy between these two distributions: Since you one-hot encoded the classes (1 for the true class and 0 otherwise), the cross-entropy is simply the negative logarithm of the estimated probability for the true class. In machine learning,