Changeset 9126:6e49f78537e6 in orange


Ignore:
Timestamp:
10/20/11 13:16:51 (2 years ago)
Author:
markotoplak
Branch:
default
Convert:
8efc11f69d35c5519f2806877607554dd08ee05c
Message:

hierarchical clustering: fixed bug in top_clusters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/clustering/hierarchical.py

    r9050 r9126  
    583583     
    584584    :rtype: list of :class:`HierarchicalCluster` instances 
    585      
     585 
    586586    """ 
    587587    candidates = set([root]) 
    588588    while len(candidates) < k: 
    589         repl = max([(max(c.left.height, c.right.height), c) for c in candidates if c.branches])[1] 
     589        repl = max([(c.height, c) for c in candidates if c.branches])[1] 
    590590        candidates.discard(repl) 
    591591        candidates.add(repl.left) 
Note: See TracChangeset for help on using the changeset viewer.