Skip to content

Commit

Permalink
Merge pull request #8 from Didayolo/scipy-update
Browse files Browse the repository at this point in the history
Scipy update
  • Loading branch information
Didayolo authored Jun 28, 2024
2 parents 3315513 + 8194be6 commit 6d162b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ranky/duel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# TODO: clarify names, add scored version of NHST and more.

import numpy as np
from scipy.stats import binom_test
from scipy.stats import binomtest
from baycomp import two_on_single, two_on_multiple

def declare_ties(a, b, comparison_func=None, **kwargs):
Expand Down Expand Up @@ -76,7 +76,7 @@ def p_wins(a, b, pval=0.05, reverse=False):
Wa, Wb = np.sum(a > b), np.sum(b > a)
if reverse:
Wa, Wb = np.sum(a < b), np.sum(b < a)
significant = binom_test(Wa, n=len(a), p=0.5) <= pval
significant = binomtest(Wa, n=len(a), p=0.5).pvalue <= pval
wins = Wa > Wb
return significant and wins # count only significant wins

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pandas
numpy
matplotlib
scikit-learn==0.23.2
scipy
scikit-learn>=1.0
scipy>=1.7.0
seaborn
networkx
python-Levenshtein
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"Operating System :: Unix",
],
install_requires=[
'pandas', 'numpy', 'matplotlib', 'scikit-learn>=0.23.2',
'scipy', 'seaborn', 'networkx', 'python-Levenshtein', 'tqdm', 'baycomp',
'pandas', 'numpy', 'matplotlib', 'scikit-learn>=1.0',
'scipy>=1.7.0', 'seaborn', 'networkx', 'python-Levenshtein', 'tqdm', 'baycomp',
],
)

0 comments on commit 6d162b4

Please sign in to comment.