
Last chance! 50% off unlimited learning
Sale ends in
ll
computes the elementwise log loss between two numeric vectors.
ll(actual, predicted)
The ground truth binary numeric vector containing 1 for the positive class and 0 for the negative class.
A numeric vector of predicted values, where the values correspond
to the probabilities that each observation in actual
belongs to the positive class
# NOT RUN {
actual <- c(1, 1, 1, 0, 0, 0)
predicted <- c(0.9, 0.8, 0.4, 0.5, 0.3, 0.2)
ll(actual, predicted)
# }
Run the code above in your browser using DataLab