Ignore:
Timestamp:
03/14/12 12:47:01 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
8dbe498b2a804cd104f187b4caeb2e2b42e6fbc1
Message:

Fixed best_n function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/feature/selection.py

    r10172 r10523  
    11__docformat__ = 'restructuredtext' 
     2 
     3from operator import itemgetter 
    24 
    35import Orange.core as orange 
     
    1719 
    1820    """ 
    19     return [x[0] for x in sorted(scores)[:n]] 
     21    return [x[0] for x in \ 
     22            sorted(scores, key=itemgetter(1), reverse=True)[:n] 
     23            ] 
    2024 
    2125bestNAtts = best_n 
Note: See TracChangeset for help on using the changeset viewer.