Skip to content

Commit

Permalink
Update test_dissim.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodv committed Jul 26, 2019
1 parent ea85c94 commit 5f9c858
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kmodes/util/tests/test_dissim.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def test_jaccard_dissim_binary(self):
with self.assertRaises(ValueError):
jaccard_dissim_binary(a, b)

# test for dissimilarity = 0 both sets are same
# test for dissimilarity = 0: sets are the same
a = np.array([[1, 1, 0, 1, 1, 0]])
b = np.array([[1, 1, 0, 1, 1, 0]])
assert_equal(0, jaccard_dissim_binary(a, b))

# test for dissimilarity = 0 sets are different
# test for dissimilarity = 1: sets are completely different
a = np.array([[0, 0, 1, 0, 0, 1]])
b = np.array([[1, 1, 0, 1, 1, 0]])
assert_equal(1, jaccard_dissim_binary(a, b))
Expand All @@ -62,12 +62,12 @@ def test_jaccard_dissim_label(self):
with self.assertRaises(ValueError):
jaccard_dissim_label(a, b)

# test for dissimilarity = 0 Both sets are same
# test for dissimilarity = 0: sets are the same
a = np.array([[1, 2, 0, 3, 1, 0]])
b = np.array([[1, 2, 0, 3, 1, 0]])
assert_equal(0, jaccard_dissim_label(a, b))

# test for dissimilarity = 1 Both sets are different
# test for dissimilarity = 1: sets are completely different
a = np.array([[1, 2, 0, 3, 1, 0]])
b = np.array([[5, 4, 6, 7, 8, 9]])
assert_equal(1, jaccard_dissim_label(a, b))
Expand Down

1 comment on commit 5f9c858

@Nikhil-Rangari
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,

i want to know how to plot k-modes cluster(not kmeans)

Please sign in to comment.