Skip to content

Commit

Permalink
Update classification_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tarantula-leo authored Nov 17, 2023
1 parent c1decdb commit 90e3cd2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sml/metrics/classification/classification_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,14 @@ def check(spu_result, sk_result):
# Test binary
y_true = jnp.array([0, 1, 1, 0, 1, 1])
y_pred = jnp.array([0, 0, 1, 0, 1, 1])
spu_result = spsim.sim_jax(sim, proc)(y_true, y_pred, pos_label=1, transform=0)
spu_result = spsim.sim_jax(sim, proc, static_argnums=(2, 5))(y_true, y_pred, 'binary', None, 1, False)
sk_result = sklearn_proc(y_true, y_pred)
check(spu_result, sk_result)

# Test multiclass
y_true = jnp.array([0, 1, 1, 0, 2, 1])
y_pred = jnp.array([0, 0, 1, 0, 2, 1])
spu_result = spsim.sim_jax(sim, proc)(
y_true, y_pred, average=None, labels=[0, 1, 2]
)
spu_result = spsim.sim_jax(sim, proc, static_argnums=(2, 5))(y_true, y_pred, None, [0,1,2], 1, True)
sk_result = sklearn_proc(y_true, y_pred, average=None, labels=[0, 1, 2])
check(spu_result, sk_result)

Expand Down

0 comments on commit 90e3cd2

Please sign in to comment.