pymatch
pymatch copied to clipboard
'threshold' parameter in match not used when method='min'
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)