original_docstring: Compute classification accuracy with a fixed threshold on distances.
      
docstring: Compute classification accuracy with a fixed threshold on distances.
docstring_tokens: Compute classification accuracy with a fixed threshold on distances .
code: def compute_accuracy(y_true, y_pred):
      '''Compute classification accuracy with a fixed threshold on distances.
      '''
      pred = y_pred.ravel() < 0.5
      return np.mean(pred == y_true)
code_tokens: def compute_accuracy ( y_true , y_pred ) : pred = y_pred . ravel ( ) < 0.5 return np . mean ( pred == y_true )
short_docstring: Compute classification accuracy with a fixed threshold on distances.
short_docstring_tokens: Compute classification accuracy with a fixed threshold on distances .
comment: '''Compute classification accuracy with a fixed threshold on distances.
      '''