pymatch icon indicating copy to clipboard operation
pymatch copied to clipboard

'threshold' parameter in match not used when method='min'

Open tlooden opened this issue 6 years ago • 0 comments

Hi,

For the function matcher.match I'm wondering if there is a reason why the parameter for threshold is only used for method=='random' ? See below:

if method == 'random':
                bool_match = abs(ctrl_scores - score) <= threshold
                matches = ctrl_scores.loc[bool_match[bool_match.scores].index]
            elif method == 'min':
                matches = abs(ctrl_scores - score).sort_values('scores').head(nmatches)

tlooden avatar Oct 21 '19 19:10 tlooden