Skip to content

Commit e8f1afa

Browse files
smueller18MaxBenChrist
authored andcommitted
fix implementation of mannwhitneyu function (blue-yonder#215)
* fix implementation of mannwhitneyu function * remove empty line at the end caused by Atom whitespace package * remove empty line at the end caused by editing through browser
1 parent d5c814a commit e8f1afa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tsfresh/feature_selection/significance_tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ def target_binary_feature_real_test(x, y, test):
116116

117117
if test == 'mann':
118118
# Perform Mann-Whitney-U test
119-
U, p_mannwhitu = stats.mannwhitneyu(x_y1, x_y0, use_continuity=True)
120-
p_mannwhitu *= 2 # To get two-sided P value (refer to scipy manual).
119+
U, p_mannwhitu = stats.mannwhitneyu(x_y1, x_y0, use_continuity=True, alternative='two-sided')
121120
return p_mannwhitu
122121
elif test == 'smir':
123122
# Perform Kolmogorov-Smirnov test

0 commit comments

Comments
 (0)