Ignore:
Timestamp:
08/02/13 16:08:08 (9 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed 'above_threshold' test condition.

It now tests True for scores equal to threshold (as documented).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/feature/selection.py

    r11645 r11646  
    2929    equal to a specified threshold. 
    3030 
    31     :param scores: a list such as one returned by 
    32       :obj:`~Orange.feature.scoring.score_all` 
    33     :type scores: list 
    34     :param threshold: threshold for selection 
    35     :type threshold: float 
     31    :param list scores: 
     32        A list such as one returned by :func:`.score_all` 
     33    :param float threshold: Threshold for selection. 
    3634    :rtype: :obj:`list` 
    3735 
    3836    """ 
    39     return [x[0] for x in scores if x[1] > threshold] 
     37    return [f for f, score in scores if score >= threshold] 
    4038 
    4139 
Note: See TracChangeset for help on using the changeset viewer.