Package smile.validation.metric
Interface CrossEntropy
public interface CrossEntropy
Cross entropy generalizes the log loss metric to multiclass problems.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
of
(int[] truth, double[][] probability) Calculates the cross entropy for multiclass classifier.
-
Method Details
-
of
static double of(int[] truth, double[][] probability) Calculates the cross entropy for multiclass classifier.- Parameters:
truth
- The sample labelsprobability
- The posterior probability of samples.- Returns:
- Cross entropy
-