Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fast kmerf #369

Merged
merged 13 commits into from
May 24, 2023
Prev Previous commit
Next Next commit
cast v to int for k-sample
  • Loading branch information
sampan501 committed May 16, 2023
commit 1c5a4f8ae3561e6a10b58fe37b041bf00c4a7805
6 changes: 3 additions & 3 deletions hyppo/independence/tests/test_kmerf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class TestKMERFStat(object):
@pytest.mark.parametrize(
"sim, obs_stat, obs_pvalue",
[
(linear, 0.253, 1.0), # test linear simulation
(spiral, 0.037, 1.0), # test spiral simulation
(multimodal_independence, -0.0363, 1.0), # test independence simulation
(linear, 1.0, 1.0), # test linear simulation
(spiral, 0.1835550720881665, 1.0), # test spiral simulation
(multimodal_independence, -0.0059788, 1.0), # test independence simulation
],
)
def test_oned(self, sim, obs_stat, obs_pvalue):
Expand Down
2 changes: 1 addition & 1 deletion hyppo/ksample/ksamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def statistic(self, *args):
else:
u, v = k_sample_transform(inputs)

return self.indep_test.statistic(u, v)
return self.indep_test.statistic(u, v.astype(int))

def test(self, *args, reps=1000, workers=1, auto=True, random_state=None):
r"""
Expand Down