From 2a0298544f8b4e960c414e29b7eb40e0664071a6 Mon Sep 17 00:00:00 2001 From: Aseem Date: Sat, 14 Dec 2024 21:03:37 -0600 Subject: [PATCH 1/2] added new markdowns to show as tabs --- .github/Diagnostic Functions.md | 12 ++++++++++++ .github/Highlights.md | 17 +++++++++++++++++ .github/Outlier Detection Functions.md | 12 ++++++++++++ README.md | 2 +- pyproject.toml | 2 +- 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/Diagnostic Functions.md create mode 100644 .github/Highlights.md create mode 100644 .github/Outlier Detection Functions.md diff --git a/.github/Diagnostic Functions.md b/.github/Diagnostic Functions.md new file mode 100644 index 0000000..05920d5 --- /dev/null +++ b/.github/Diagnostic Functions.md @@ -0,0 +1,12 @@ +### Summary of Diagnostic Functions +* `build_seasonal_outliers_plot_classic(df):` Show outliers using Classical Seasonal Decomposition algorithm. +* `build_seasonal_plot_classic(df):` Build seasonal plot using classic seasonal trend decomposition. +* `build_outliers_plot_stl(df):` Show outliers using Seasonal-Trend Decomposition using LOESS (STL). +* `build_seasonal_plot_stl(df):` Build seasonal plots using STL for a given dataframe. +* `build_outliers_plot_mstl(df):` Show outliers using Multiple Seasonal-Trend Decomposition using LOESS (MSTL). +* `build_seasonal_plot_mstl(df):` Build multiple seasonal plots using MSTL for a given dataframe. +* `build_moving_average_outliers_plot(df):` Show outliers using Moving Average and Z-score algorithm. +* `build_iqr_plot(df):` Build IQR plot for a given dataframe (for less than 2 years of data). +* `build_monthwise_plot(df):` Build month-wise plot for a given dataframe. +* `build_decomposition_results(df):` Get seasonal decomposition results for a given dataframe. +* `conduct_stationarity_check(df):` Conduct stationarity checks for a feature (dataframe's count column). \ No newline at end of file diff --git a/.github/Highlights.md b/.github/Highlights.md new file mode 100644 index 0000000..df1e15f --- /dev/null +++ b/.github/Highlights.md @@ -0,0 +1,17 @@ +### Highlights + Unlike many open-source packages for outlier detection, PyCatcher provides several distinctive features: +* **Automatic Model Selection:** +PyCatcher automatically detects whether to use an additive or multiplicative +decomposition model, ensuring the most accurate detection of outliers based on the characteristics of your data. +* **Dynamic Method Selection Based on Data Size:** +PyCatcher seamlessly switches between Seasonal Trend Decomposition (for datasets spanning at least two years) and +Inter Quartile Range (IQR) for shorter time periods, offering flexibility without manual intervention. +* **Wide Time Frequency Support:** +Supports multiple time-series frequencies — including daily, weekly, monthly, and quarterly data—without requiring +users to pre-process or adjust their datasets. +* **Choice of Different Seasonal Trend Algorithms:** Support for outlier detection using various Seasonal Trend +Decomposition algorithms (Classic; STL; MSTL). +* **Integrated Diagnostics:** PyCatcher includes comprehensive diagnostic tools, enabling users to visualize outliers, +trends +and seasonal patterns, evaluate data stationarity, and analyze decomposition results. +* **User Interface:** Availability of a simple user interface for the users to upload file for outlier detection using IQR. diff --git a/.github/Outlier Detection Functions.md b/.github/Outlier Detection Functions.md new file mode 100644 index 0000000..c4660dc --- /dev/null +++ b/.github/Outlier Detection Functions.md @@ -0,0 +1,12 @@ +### Summary of Package Functions +* `detect_outliers_classic(df):` Detect outliers in a time-series dataframe using classic seasonal trend decomposition. +* `detect_outliers_today_classic(df):` Detect outliers for the current date using classic seasonal trend decomposition. +* `detect_outliers_latest_classic(df):` Detect latest outliers using classic seasonal trend decomposition. +* `detect_outliers_stl(df):` Detect outliers using Seasonal-Trend Decomposition using LOESS (STL). +* `detect_outliers_today_stl(df):` Detect outliers for the current date using STL. +* `detect_outliers_latest_stl(df):` Detect latest outliers using STL. +* `detect_outliers_mstl(df):` Detect outliers using Multiple Seasonal-Trend Decomposition using LOESS (MSTL). +* `detect_outliers_today_mstl(df):` Detect outliers for the current date using MSTL. +* `detect_outliers_latest_mstl(df):` Detect latest outliers using MSTL. +* `detect_outliers_iqr(df):` Detect outliers in a time-series dataframe when there's less than 2 years of data. +* `detect_outliers_moving_average(df):` Detect outliers using moving average method. \ No newline at end of file diff --git a/README.md b/README.md index 1fe3716..c95f0f2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ pip install pycatcher
-## Summary of features +### Summary of features PyCatcher provides an efficient solution for detecting anomalies in time-series data using various statistical methods. Below are the available techniques for anomaly detection, each optimized for different data characteristics. diff --git a/pyproject.toml b/pyproject.toml index a305708..3f99b08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pycatcher" -version = "0.0.44" +version = "0.0.45" description = "This package identifies outlier(s) for a given time-series dataset in simple steps. It supports day, week, month and quarter level time-series data." authors = ["Aseem Anand "] maintainers = ["Jagadish Pamarthi "] From bc9eaaad3d80c9a7b1db95ab0ba45b5f8e595168 Mon Sep 17 00:00:00 2001 From: Jagadish Pamarthi <149593180+sarikajagadish@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:49:09 -0600 Subject: [PATCH 2/2] Refactored a few things to see if this works from your perspective --- README.md | 55 ++----------------- {.github => docs}/Diagnostic Functions.md | 0 {.github => docs}/Highlights.md | 0 .../Outlier Detection Functions.md | 0 4 files changed, 4 insertions(+), 51 deletions(-) rename {.github => docs}/Diagnostic Functions.md (100%) rename {.github => docs}/Highlights.md (100%) rename {.github => docs}/Outlier Detection Functions.md (100%) diff --git a/README.md b/README.md index c95f0f2..1c1f9c7 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ This package identifies outlier(s) for a given time-series dataset in simple steps. It supports day, week, month and quarter level time-series data. +- [Highlights](docs/Highlights.md) +- [Outlier Detection Functions](docs/Outlier%20Detection%20Functions.md) +- [Diagnostic Functions](docs/Diagnostic%20Functions.md) + ### Installation ```bash @@ -159,57 +163,6 @@ Build an IQR plot for a given dataframe (for less than 2 years of data).
-### Summary of Package Functions -* `detect_outliers_classic(df):` Detect outliers in a time-series dataframe using classic seasonal trend decomposition. -* `detect_outliers_today_classic(df):` Detect outliers for the current date using classic seasonal trend decomposition. -* `detect_outliers_latest_classic(df):` Detect latest outliers using classic seasonal trend decomposition. -* `detect_outliers_stl(df):` Detect outliers using Seasonal-Trend Decomposition using LOESS (STL). -* `detect_outliers_today_stl(df):` Detect outliers for the current date using STL. -* `detect_outliers_latest_stl(df):` Detect latest outliers using STL. -* `detect_outliers_mstl(df):` Detect outliers using Multiple Seasonal-Trend Decomposition using LOESS (MSTL). -* `detect_outliers_today_mstl(df):` Detect outliers for the current date using MSTL. -* `detect_outliers_latest_mstl(df):` Detect latest outliers using MSTL. -* `detect_outliers_iqr(df):` Detect outliers in a time-series dataframe when there's less than 2 years of data. -* `detect_outliers_moving_average(df):` Detect outliers using moving average method. - -
- -### Summary of Diagnostic Plots -* `build_seasonal_outliers_plot_classic(df):` Show outliers using Classical Seasonal Decomposition algorithm. -* `build_seasonal_plot_classic(df):` Build seasonal plot using classic seasonal trend decomposition. -* `build_outliers_plot_stl(df):` Show outliers using Seasonal-Trend Decomposition using LOESS (STL). -* `build_seasonal_plot_stl(df):` Build seasonal plots using STL for a given dataframe. -* `build_outliers_plot_mstl(df):` Show outliers using Multiple Seasonal-Trend Decomposition using LOESS (MSTL). -* `build_seasonal_plot_mstl(df):` Build multiple seasonal plots using MSTL for a given dataframe. -* `build_moving_average_outliers_plot(df):` Show outliers using Moving Average and Z-score algorithm. -* `build_iqr_plot(df):` Build IQR plot for a given dataframe (for less than 2 years of data). -* `build_monthwise_plot(df):` Build month-wise plot for a given dataframe. -* `build_decomposition_results(df):` Get seasonal decomposition results for a given dataframe. -* `conduct_stationarity_check(df):` Conduct stationarity checks for a feature (dataframe's count column). - -
- -### Highlights - Unlike many open-source packages for outlier detection, PyCatcher provides several distinctive features: -* **Automatic Model Selection:** -PyCatcher automatically detects whether to use an additive or multiplicative -decomposition model, ensuring the most accurate detection of outliers based on the characteristics of your data. -* **Dynamic Method Selection Based on Data Size:** -PyCatcher seamlessly switches between Seasonal Trend Decomposition (for datasets spanning at least two years) and -Inter Quartile Range (IQR) for shorter time periods, offering flexibility without manual intervention. -* **Wide Time Frequency Support:** -Supports multiple time-series frequencies — including daily, weekly, monthly, and quarterly data—without requiring -users to pre-process or adjust their datasets. -* **Choice of Different Seasonal Trend Algorithms:** Support for outlier detection using various Seasonal Trend -Decomposition algorithms (Classic; STL; MSTL). -* **Integrated Diagnostics:** PyCatcher includes comprehensive diagnostic tools, enabling users to visualize outliers, -trends -and seasonal patterns, evaluate data stationarity, and analyze decomposition results. -* **User Interface:** Availability of a simple user interface for the users to upload file for outlier detection using IQR. -Future versions will include advanced algorithms. - -
- ### Example Usage To see an example of how to use the `pycatcher` package for outlier detection in time-series data, check out the [Example Notebook](https://github.com/aseemanand/pycatcher/blob/main/notebooks/Example%20Notebook.ipynb). diff --git a/.github/Diagnostic Functions.md b/docs/Diagnostic Functions.md similarity index 100% rename from .github/Diagnostic Functions.md rename to docs/Diagnostic Functions.md diff --git a/.github/Highlights.md b/docs/Highlights.md similarity index 100% rename from .github/Highlights.md rename to docs/Highlights.md diff --git a/.github/Outlier Detection Functions.md b/docs/Outlier Detection Functions.md similarity index 100% rename from .github/Outlier Detection Functions.md rename to docs/Outlier Detection Functions.md