Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Jul 21, 2023
1 parent d7a696b commit d995845
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions doc/conditional_independence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ which may be unrealistic in certain datasets.

fisherz

:mod:`pywhy_stats.power_divergence` Discrete, Categorical and Binary Data
-------------------------------------------------------------------------
:mod:`pywhy_stats.independence.power_divergence` Discrete, Categorical and Binary Data
--------------------------------------------------------------------------------------
If one has discrete data, then the test to use is based on Chi-square tests. The :math:`G^2`
class of tests will construct a contingency table based on the number of levels across
each discrete variable. An exponential amount of data is needed for increasing levels
Expand Down
2 changes: 1 addition & 1 deletion doc/whats_new/v0.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Version 0.1
Changelog
---------

- |Feature| Implement partial correlation test :func:`pywhy_stats.fisherz`, by `Adam Li`_ (:pr:`7`)
- |Feature| Implement partial correlation test :func:`pywhy_stats.independence.fisherz`, by `Adam Li`_ (:pr:`7`)
- |Feature| Add (un)conditional kernel independence test by `Patrick Blöbaum`_, co-authored by `Adam Li`_ (:pr:`14`)
- |Feature| Add categorical independence tests by `Adam Li`_, (:pr:`18`)

Expand Down
2 changes: 1 addition & 1 deletion pywhy_stats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ._version import __version__ # noqa: F401
from .api import Methods, independence_test
from .independence import fisherz, kci
from .independence import fisherz, kci, power_divergence
from .pvalue_result import PValueResult
10 changes: 5 additions & 5 deletions pywhy_stats/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class Methods(Enum):
"""Choose an automatic method based on the data."""

FISHERZ = fisherz
""":py:mod:`~pywhy_stats.fisherz`: Fisher's Z test for independence"""
""":py:mod:`pywhy_stats.independence.fisherz`: Fisher's Z test for independence"""

KCI = kci
""":py:mod:`~pywhy_stats.kci`: Conditional kernel independence test"""
""":py:mod:`pywhy_stats.independence.kci`: Conditional kernel independence test"""


def independence_test(
Expand Down Expand Up @@ -60,8 +60,8 @@ def independence_test(
See Also
--------
fisherz : Fisher's Z test for independence
kci : Kernel Conditional Independence test
pywhy_stats.independence.fisherz : Fisher's Z test for independence
pywhy_stats.independence.kci : Kernel Conditional Independence test
"""
method_module: ModuleType
if method == Methods.AUTO:
Expand All @@ -72,7 +72,7 @@ def independence_test(
f"but got {method}."
)
else:
method_module = method
method_module = method # type: ignore

if method_module == Methods.FISHERZ:
if condition_on is None:
Expand Down
2 changes: 1 addition & 1 deletion pywhy_stats/independence/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import fisherz, kci
from . import fisherz, kci, power_divergence
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from scipy import stats
from sklearn.preprocessing import LabelEncoder

from .pvalue_result import PValueResult
from ..pvalue_result import PValueResult


def ind(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_power_divergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from numpy.testing import assert_almost_equal

from pywhy_stats import power_divergence
from pywhy_stats.independence import power_divergence

from .testdata import testdata

Expand Down

0 comments on commit d995845

Please sign in to comment.