def compute_accuracy(predictions, labels):
 return labels[(predictions.ravel() < 0.5)].mean()

def compute_accuracy ( predictions , labels ) : return labels [ ( predictions . ravel ( ) < 0.5 ) ] . mean ( )
compute classification accuracy with a fixed threshold on distances .