indicator function
Say it “indicator of y equals k”
1 if the condition inside is true, 0 otherwise.
Example
Accuracy is the average of an indicator.
In code
(y_hat == y).astype(int)(y_hat == y).float()Where you’ll see it in ML
Accuracy, one-hot labels, 0–1 loss.