code: def test_bedroc_score():
      """Test BEDROC."""
      num_actives = 20
      num_total = 400
  
      y_true_actives = np.ones(num_actives)
      y_true_inactives = np.zeros(num_total - num_actives)
      y_true = np.concatenate([y_true_actives, y_true_inactives])
  
      # Best score case
      y_pred_best = dc.metrics.to_one_hot(
          np.concatenate([y_true_actives, y_true_inactives])
      )
      best_score = dc.metrics.bedroc_score(y_true, y_pred_best)
      np.testing.assert_almost_equal(best_score, 1.0)
  
      # Worst score case
      worst_pred_actives = np.zeros(num_actives)
      worst_pred_inactives = np.ones(num_total - num_actives)
      y_pred_worst = dc.metrics.to_one_hot(
          np.concatenate([worst_pred_actives, worst_pred_inactives])
      )
      worst_score = dc.metrics.bedroc_score(y_true, y_pred_worst)
      np.testing.assert_almost_equal(worst_score, 0.0, 4)
  
file_path: deepchem/deepchem/metrics/tests/test_metrics.py
imports: import numpy
  import deepchem
label_desc: Use image node_id 5 for calling a global function with example usage: test_bedroc_score() without return types