Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marco.fumagalli committed Aug 31, 2023
1 parent a4d8472 commit 80ba922
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xi-method"
version = "0.1.5"
version = "0.1.6"
description = "Post hoc explanations for ML models through measures of statistical dependence"
authors = ["marco.fumagalli <[email protected]>",
"valentina.ghidini <[email protected]"]
Expand Down
24 changes: 12 additions & 12 deletions tests/test_xi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def test_separation_measurement_m_int():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand All @@ -16,13 +16,13 @@ def test_separation_measurement_m_int():
0.1880844, 0.42336663])
np.testing.assert_allclose(p.get('L1').explanation,
exp,
rtol=0.05,
atol=0.05)
rtol=0.1,
atol=0.1)


def test_separation_measurement_obs():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand All @@ -34,7 +34,7 @@ def test_separation_measurement_obs():

def test_separation_measurement_discrete():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand All @@ -46,7 +46,7 @@ def test_separation_measurement_discrete():

def test_separation_measurement_m_dict():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand Down Expand Up @@ -76,7 +76,7 @@ def test_separation_measurement_regressor():

def test_separation_measurement_hellinger():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand All @@ -89,13 +89,13 @@ def test_separation_measurement_hellinger():
0.04954897])
np.testing.assert_allclose(p.get('Hellinger').explanation,
exp,
rtol=0.05,
atol=0.05)
rtol=0.2,
atol=0.2)


def test_separation_measurement_L2():
np.random.seed(3)
df = load_wine_quality_dataset()
df = load_wine_quality_red_dataset()
Y = df.quality.values
df.drop(columns='quality', inplace=True)

Expand All @@ -108,8 +108,8 @@ def test_separation_measurement_L2():
0.04954897])
np.testing.assert_allclose(p.get('L2').explanation,
exp,
rtol=0.05,
atol=0.05)
rtol=0.1,
atol=0.1)


def test_separation_measurement_regressor_hellinger():
Expand Down

0 comments on commit 80ba922

Please sign in to comment.