Skip to content

Commit abe014e

Browse files
author
mvargas33
committed
Merge remote-tracking branch 'upstream/master' into feat-tclassifier
2 parents 0c855fe + 8571f97 commit abe014e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/metric_learn_test.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,17 @@ def test_singular_returns_pseudo_inverse(self):
7979
class TestSCML(object):
8080
@pytest.mark.parametrize('basis', ('lda', 'triplet_diffs'))
8181
def test_iris(self, basis):
82+
"""
83+
SCML applied to Iris dataset should give better results when
84+
computing class separation.
85+
"""
8286
X, y = load_iris(return_X_y=True)
87+
before = class_separation(X, y)
8388
scml = SCML_Supervised(basis=basis, n_basis=85, k_genuine=7, k_impostor=5,
8489
random_state=42)
8590
scml.fit(X, y)
86-
csep = class_separation(scml.transform(X), y)
87-
assert csep < 0.24
91+
after = class_separation(scml.transform(X), y)
92+
assert before > after + 0.03 # It's better by a margin of 0.03
8893

8994
def test_big_n_features(self):
9095
X, y = make_classification(n_samples=100, n_classes=3, n_features=60,

0 commit comments

Comments
 (0)