This is a really dumb question, but here goes: is there a way to compute cross-entropy of two probability distributions? There is CrossEntropyLayer[]
, so Mathematica knows about cross-entropy, but no actual function, it seems, unless I am missing something obvious...
Expectation[]
... $\endgroup$Expectation[Log[PDF[...], ...]
? $\endgroup$Expectation[]
will automatically handle it depending on whether both distributions are discrete or continuous. $\endgroup$NExpectation
$\endgroup$