From 211d2b57680d773a54bc26a4634ad60efb00aefe Mon Sep 17 00:00:00 2001 From: "N. L." Date: Mon, 4 Dec 2023 05:41:50 +0100 Subject: [PATCH] feat(logger): add logger in qq_plot.py --- src/anomalytics/evals/__init__.py | 3 ++- src/anomalytics/evals/qq_plot.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/anomalytics/evals/__init__.py b/src/anomalytics/evals/__init__.py index 6c34313..a180ca9 100644 --- a/src/anomalytics/evals/__init__.py +++ b/src/anomalytics/evals/__init__.py @@ -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 diff --git a/src/anomalytics/evals/qq_plot.py b/src/anomalytics/evals/qq_plot.py index c494846..f12366a 100644 --- a/src/anomalytics/evals/qq_plot.py +++ b/src/anomalytics/evals/qq_plot.py @@ -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): @@ -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(