Skip to content

Commit

Permalink
Merge branch 'master' into launch-fetch-run-queue-item-query
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning committed Aug 16, 2022
2 parents 3326440 + ccd51c9 commit 9b07326
Show file tree
Hide file tree
Showing 8 changed files with 455 additions and 322 deletions.
2 changes: 1 addition & 1 deletion tests/functional_tests/t0_main/sacred/t1_regression.py
Expand Up @@ -20,6 +20,6 @@ def run(c, gamma):
per = permutation(iris.target.size)
iris.data = iris.data[per]
iris.target = iris.target[per]
clf = svm.SVC(c, "rbf", gamma=gamma)
clf = svm.SVC(C=c, kernel="rbf", gamma=gamma)
clf.fit(iris.data[:90], iris.target[:90])
return clf.score(iris.data[90:], iris.target[90:])
10 changes: 9 additions & 1 deletion tests/unit_tests/test_plots.py
Expand Up @@ -38,10 +38,18 @@ def test_roc(dummy_classifier):


def test_precision_recall(dummy_classifier):
sklearn = pytest.importorskip("sklearn")
from pkg_resources import parse_version

# note: sklearn fixed the calculation of precision and recall see: https://github.com/scikit-learn/scikit-learn/issues/23213
*_, y_test, _, y_probas = dummy_classifier
pr = precision_recall(y_test, y_probas)

assert pr.value.data[0] == [0, 1.0, 1.0]
assert (
pr.value.data[0] == [0, 1.0, 1.0]
if parse_version(sklearn.__version__) < parse_version("1.1")
else [0, 0.5, 1.0]
)


def test_heatmap():
Expand Down

0 comments on commit 9b07326

Please sign in to comment.