Usage
negative_log_loss(predicted_densities, ...)
Arguments
- predicted_densities
The predicted densities from a learner predicted at newdata
.
- ...
Because nadir::compare_learners()
passes estimates, truth
to the
loss_metric
passed to it, negative_log_loss
accepts ... but doesn't do anything
with it.
Value
A sum of the negative log loss given a vector of predicted probabilities/densities
for some observed outcome.
Details
negative_log_loss
encodes the logic:
if \(\hat p_n\) is a good model of the conditional densities, then it should minimize:
$$ -\sum(\log(\hat p_n(X_i)) $$