Skip to content

Commit f62bac7

Browse files
committed
Add comment about negative distance values
1 parent 9b6eedd commit f62bac7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cluster/method/hierarchical.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class HierarchicalClustering(BaseClusterMethod):
5656
5757
:param data: The collection of items to be clustered.
5858
:param distance_function: A function which takes two elements of ``data``
59-
and returns a distance between both elements.
59+
and returns a distance between both elements (note that the distance
60+
should not be returned as negative value!)
6061
:param linkage: The method used to determine the distance between two
6162
clusters. See :py:meth:`~.HierarchicalClustering.set_linkage_method` for
6263
possible values.
@@ -206,7 +207,7 @@ def getlevel(self, threshold):
206207
self.cluster()
207208

208209
return self._data[0].getlevel(threshold)
209-
210+
210211
def display(self):
211212
"""
212213
Prints a simple dendogram-like representation of the full cluster

0 commit comments

Comments
 (0)