Skip to content

Commit

Permalink
feat(logger): add logger in qq_plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ninopleno committed Dec 4, 2023
1 parent 1930122 commit 211d2b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/anomalytics/evals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__all__ = ["ks_1sampl"]
__all__ = ["ks_1sample", "calculate_theoretical_q", "visualize_qq_plot"]

from anomalytics.evals.kolmogorv_smirnov import ks_1sample
from anomalytics.evals.qq_plot import calculate_theoretical_q, visualize_qq_plot
4 changes: 3 additions & 1 deletion src/anomalytics/evals/qq_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def visualize_qq_plot(
plot_width: int = 15,
plot_height: int = 10,
):
logger.debug(f"performing qq plot for {stats_method} analysis with total of {len(fit_params)} fir params")

if not isinstance(ts, pd.Series):
raise TypeError("Invalid value! The `ts` argument must be a Pandas Series")
if not isinstance(ts.index, pd.DatetimeIndex):
Expand Down Expand Up @@ -133,7 +135,7 @@ def visualize_qq_plot(
elif stats_method == "1CSVM":
raise NotImplementedError("Not implemented yet!")

logger.debug(f"fail to perform kolmogorov smirnov test for {stats_method} stats method")
logger.debug(f"fail to plot qq for {stats_method} analysis")

plt.scatter(theoretical_q, sorted_nonzero_ts, c="black", label=scatter_label)
plt.plot(
Expand Down

0 comments on commit 211d2b5

Please sign in to comment.