Skip to content

Commit

Permalink
Merge branch 'master' into update_compute_order
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 3, 2021
2 parents 8df98e2 + 07eeca2 commit 323ae54
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
8 changes: 1 addition & 7 deletions tests/classification/test_auc.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ def test_auc_functional(self, x, y, reorder):
@pytest.mark.parametrize("reorder", [True, False])
def test_auc_differentiability(self, x, y, reorder):
self.run_differentiability_test(
preds=x,
target=y,
metric_module=AUC,
metric_functional=auc,
metric_args={
"reorder": reorder
}
preds=x, target=y, metric_module=AUC, metric_functional=auc, metric_args={"reorder": reorder}
)


Expand Down
12 changes: 6 additions & 6 deletions tests/classification/test_auroc.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def _sk_auroc_multilabel_multidim_prob(preds, target, num_classes, average='macr
@pytest.mark.parametrize("average", ['macro', 'weighted', 'micro'])
@pytest.mark.parametrize("max_fpr", [None, 0.8, 0.5])
@pytest.mark.parametrize(
"preds, target, sk_metric, num_classes", [
(_input_binary_prob.preds, _input_binary_prob.target, _sk_auroc_binary_prob, 1),
(_input_mcls_prob.preds, _input_mcls_prob.target, _sk_auroc_multiclass_prob, NUM_CLASSES),
(_input_mdmc_prob.preds, _input_mdmc_prob.target, _sk_auroc_multidim_multiclass_prob, NUM_CLASSES),
(_input_mlb_prob.preds, _input_mlb_prob.target, _sk_auroc_multilabel_prob, NUM_CLASSES),
(_input_mlmd_prob.preds, _input_mlmd_prob.target, _sk_auroc_multilabel_multidim_prob, NUM_CLASSES)]
"preds, target, sk_metric, num_classes",
[(_input_binary_prob.preds, _input_binary_prob.target, _sk_auroc_binary_prob, 1),
(_input_mcls_prob.preds, _input_mcls_prob.target, _sk_auroc_multiclass_prob, NUM_CLASSES),
(_input_mdmc_prob.preds, _input_mdmc_prob.target, _sk_auroc_multidim_multiclass_prob, NUM_CLASSES),
(_input_mlb_prob.preds, _input_mlb_prob.target, _sk_auroc_multilabel_prob, NUM_CLASSES),
(_input_mlmd_prob.preds, _input_mlmd_prob.target, _sk_auroc_multilabel_multidim_prob, NUM_CLASSES)]
)
class TestAUROC(MetricTester):

Expand Down
18 changes: 9 additions & 9 deletions tests/classification/test_cohen_kappa.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ def _sk_cohen_kappa_multidim_multiclass(preds, target, weights=None):

@pytest.mark.parametrize("weights", ['linear', 'quadratic', None])
@pytest.mark.parametrize(
"preds, target, sk_metric, num_classes", [
(_input_binary_prob.preds, _input_binary_prob.target, _sk_cohen_kappa_binary_prob, 2),
(_input_binary.preds, _input_binary.target, _sk_cohen_kappa_binary, 2),
(_input_mlb_prob.preds, _input_mlb_prob.target, _sk_cohen_kappa_multilabel_prob, 2),
(_input_mlb.preds, _input_mlb.target, _sk_cohen_kappa_multilabel, 2),
(_input_mcls_prob.preds, _input_mcls_prob.target, _sk_cohen_kappa_multiclass_prob, NUM_CLASSES),
(_input_mcls.preds, _input_mcls.target, _sk_cohen_kappa_multiclass, NUM_CLASSES),
(_input_mdmc_prob.preds, _input_mdmc_prob.target, _sk_cohen_kappa_multidim_multiclass_prob, NUM_CLASSES),
(_input_mdmc.preds, _input_mdmc.target, _sk_cohen_kappa_multidim_multiclass, NUM_CLASSES)]
"preds, target, sk_metric, num_classes",
[(_input_binary_prob.preds, _input_binary_prob.target, _sk_cohen_kappa_binary_prob, 2),
(_input_binary.preds, _input_binary.target, _sk_cohen_kappa_binary, 2),
(_input_mlb_prob.preds, _input_mlb_prob.target, _sk_cohen_kappa_multilabel_prob, 2),
(_input_mlb.preds, _input_mlb.target, _sk_cohen_kappa_multilabel, 2),
(_input_mcls_prob.preds, _input_mcls_prob.target, _sk_cohen_kappa_multiclass_prob, NUM_CLASSES),
(_input_mcls.preds, _input_mcls.target, _sk_cohen_kappa_multiclass, NUM_CLASSES),
(_input_mdmc_prob.preds, _input_mdmc_prob.target, _sk_cohen_kappa_multidim_multiclass_prob, NUM_CLASSES),
(_input_mdmc.preds, _input_mdmc.target, _sk_cohen_kappa_multidim_multiclass, NUM_CLASSES)]
)
class TestCohenKappa(MetricTester):
atol = 1e-5
Expand Down

0 comments on commit 323ae54

Please sign in to comment.