Skip to content

Commit

Permalink
Stat ranges to docs (#331)
Browse files Browse the repository at this point in the history
* Add range of Friedman Rafsky test statistic to docs

* improve range documentation

Co-authored-by: Sambit Panda <36676569+sampan501@users.noreply.github.com>
  • Loading branch information
oakla and sampan501 committed Aug 30, 2022
1 parent 8c28ff6 commit 9aa5c56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hyppo/independence/friedman_rafsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _num_runs(self, labels, MST_connections):

def statistic(self, x, y):
r"""
Helper function that calculates the Friedman Rafksy test statistic.
Helper function that calculates the Friedman Rafksy test statistic.
Parameters
----------
Expand All @@ -83,7 +83,7 @@ def statistic(self, x, y):
Returns
-------
stat : float
The computed Friedman Rafsky statistic.
The computed Friedman Rafsky statistic. A value between ``2`` and ``n``.
"""
x = np.transpose(x)
labels = np.transpose(y)
Expand All @@ -102,7 +102,7 @@ def test(
random_state=None,
):
r"""
Calculates the Friedman Rafsky test statistic and p-value.
Calculates the Friedman Rafsky test statistic and p-value.
Parameters
----------
Expand Down
2 changes: 2 additions & 0 deletions tutorials/independence.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,6 @@
# multivariate features. Lastly, labels for X and Y need not be 0 and 1, they just need be consistent across samples.
# These tests runs like :ref:`any other test<general indep>`.
#
# Test statistic range: :math:`[2, m+n]`
#
# .. _[1]: https://link.springer.com/article/10.1007/s10182-020-00378-1

0 comments on commit 9aa5c56

Please sign in to comment.