Unverified Commit dcadaa54 authored by hsjang001205's avatar hsjang001205 Committed by GitHub
Browse files

Update test_metrics.py

parent c72c2e1f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -77,17 +77,14 @@ def test_concordance_index():

  y_true = np.array([1, 3, 5, 4, 2])
  y_pred = np.array([3, 1, 5, 4, 2])

  assert metric.compute_singletask_metric(y_true, y_pred) == 0.7

  # best case
  y_true = np.array([1, 3, 5, 4, 2])
  y_pred = np.array([1, 3, 5, 4, 2])

  assert metric.compute_singletask_metric(y_true, y_pred) == 1.0

  # duplicate prediction value
  y_true = np.array([1, 3, 5, 4, 2])
  y_pred = np.array([1, 3, 4, 4, 2])

  assert metric.compute_singletask_metric(y_true, y_pred) == 0.95