# HG changeset patch # User Nicolas Saunier # Date 1528751273 14400 # Node ID 6ba30b259525e38fd697a8a5b2ddf64dd439e591 # Parent acb4f6f6545d35bdf7b0489b13ae5bb6f2a6bcf0 minor diff -r acb4f6f6545d -r 6ba30b259525 python/ml.py --- a/python/ml.py Sun Jun 10 23:26:14 2018 -0400 +++ b/python/ml.py Mon Jun 11 17:07:53 2018 -0400 @@ -150,12 +150,6 @@ code,distance = vq(features,centroids) # code starting from 0 (represent first cluster) to k-1 (last cluster) return code,sigma -class Cluster: - 'Represents a cluster, with a prototype id and the list of instances in cluster' - def __init__(prototypeId, memberIndices = []): - self.prototypeId = prototypeId - self.memberIndices = memberIndices - def assignToPrototypeClusters(instances, prototypeIndices, similarities, minSimilarity, similarityFunc = None, minClusterSize = 0): '''Assigns instances to prototypes if minClusterSize is not 0, the clusters will be refined by removing iteratively the smallest clusters