Skip to content

Commit

Permalink
finished todos
Browse files Browse the repository at this point in the history
  • Loading branch information
pnavada committed Nov 22, 2023
1 parent 5c20c54 commit 72ea417
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ keywords =

[options]
install_requires =
y0>=0.2.2
y0>=0.2.3
scipy
numpy
ananke
pgmpy
matplotlib
pandas
seaborn

# Random options
zip_safe = false
Expand Down
7 changes: 6 additions & 1 deletion src/eliater/network_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from numpy import mean, quantile
from tqdm.auto import trange

Expand Down Expand Up @@ -496,7 +497,6 @@ def generate_plot_expected_p_value_vs_num_data_points(
]
)

# TODO use seaborn for high quality plots
if len(conditions) < 1:
plt.title(f"Independence of {left} and {right}")

Check warning on line 501 in src/eliater/network_validation.py

View check run for this annotation

Codecov / codecov/patch

src/eliater/network_validation.py#L501

Added line #L501 was not covered by tests
else:
Expand All @@ -505,11 +505,16 @@ def generate_plot_expected_p_value_vs_num_data_points(

plt.xlabel("Data Points")
plt.ylabel("Expected p-Value")

Check warning on line 507 in src/eliater/network_validation.py

View check run for this annotation

Codecov / codecov/patch

src/eliater/network_validation.py#L506-L507

Added lines #L506 - L507 were not covered by tests

sns.lineplot(x=list(range(start, stop, step)), y=p_vals)

Check warning on line 509 in src/eliater/network_validation.py

View check run for this annotation

Codecov / codecov/patch

src/eliater/network_validation.py#L509

Added line #L509 was not covered by tests

plt.errorbar(

Check warning on line 511 in src/eliater/network_validation.py

View check run for this annotation

Codecov / codecov/patch

src/eliater/network_validation.py#L511

Added line #L511 was not covered by tests
list(range(start, stop, step)),
p_vals,
yerr=np.array([lower_errors, higher_errors]),
ecolor="grey",
elinewidth=0.5,
fmt="none",
)
plt.hlines(significance_level, 0, stop, linestyles="dashed")
plt.show()

Check warning on line 520 in src/eliater/network_validation.py

View check run for this annotation

Codecov / codecov/patch

src/eliater/network_validation.py#L519-L520

Added lines #L519 - L520 were not covered by tests

0 comments on commit 72ea417

Please sign in to comment.