5
$\begingroup$

Consider a binary classification dataset (X, Y), generated according to some unknown distribution $P(X, Y)$. I have a question about models which output probabilities by minimizing the cross-entropy loss (logistic regression and deep models using a final softmax layer).

  • do these models attempt to predict the true conditional probability $P(Y|X)$?
  • or do they aim for a weaker result, like for example trying to get the order between the classes right?
$\endgroup$

1 Answer 1

3
$\begingroup$

Minimizing crossentropy loss is equivalent to maximum likelihood estimation of the regression coefficients and thus to maximum likelihood estimation of the conditional probabilities. (Since the probabilities are a decent function of the regression coefficients, the MLE of the probabilities is that same decent function of the regression coefficient MLE.)

Consequently, yes, the models seek out something like $P(Y\vert X)$, but they go beyond that. When you have multiple classes (more than just two), these models are supposed to seek out the true probabilities of all classes, not just the one with the highest probability.

Neural networks are known for giving poor probability predictions, however, so I will leave a link to a related question of mine about calibration of the probabilities of the non-dominant classes.

$\endgroup$
5
  • $\begingroup$ Doesn't your MLE argument assume that the data is generated by a logistic regression model of unknown parameter? That's not true in the general case. $\endgroup$
    – usual me
    Nov 20, 2022 at 6:23
  • $\begingroup$ @usualme are you trying to ask if logistic regression can approximate any functional form of $P(y|X)$, then you answered yourself, the answer is no. $\endgroup$
    – Tim
    Nov 20, 2022 at 9:02
  • $\begingroup$ @Tim Thanks, now I understand the logistic regression case. What about deep neural networks, which are universal approximators? Do they predict the true $P(y|X)$? $\endgroup$
    – usual me
    Nov 20, 2022 at 12:30
  • 1
    $\begingroup$ @usualme with an infinitely large network and an infinite amount of data it's guaranteed, but it still the function needs to meet some conditions (continuous, bounded). $\endgroup$
    – Tim
    Nov 20, 2022 at 12:59
  • $\begingroup$ @usualme I strongly recommend you asking that as a follow-up question and linking it here $\endgroup$
    – Silverfish
    Nov 20, 2022 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.