I am using keras to perform binary classification (single label, one or zero).
I would like to create a custom metric that takes the highest 10% from the predictions and calculates the accuracy of those.
So for example with the labels [1, 0, 1, 1, 0, 1, 0, 1, 0, 1]
and the predictions [0.5, 0.7, 0.98, 0.1, 0.2, 0.5, 0.2, 0.1, 0.9, 0.8]
It only computes the accuracy of the 0.98 prediction.