Skip to content

Commit

Permalink
Test for composite delta using sklearn distance function
Browse files Browse the repository at this point in the history
Cf #2
  • Loading branch information
thvitt committed Sep 30, 2017
1 parent 1a34d67 commit f9e12b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/deltas_test.py
Expand Up @@ -54,3 +54,10 @@ def eder_test(self):

def cosine_delta_test(self):
self.check_function(d.functions.cosine_delta, 0.6156353166442046)

def composite_metric_test(self):
mcosine = d.MetricDeltaFunction('cosine', 'mcosine')
assert mcosine.fix_symmetry == True, "fix_symmetry is False!?"
mcd = d.CompositeDeltaFunction('mcosine-z_score', 'metric_cosine_delta')
assert mcd.basis.fix_symmetry == True, "basis.fix_symmetry is False!?"
self.check_function(d.functions.metric_cosine_delta, 0.6156353166442046)

0 comments on commit f9e12b0

Please sign in to comment.