From 1be88dd1f0088c2d5437ab2bfd7f345884fcb572 Mon Sep 17 00:00:00 2001 From: Achintya Shankhdhar Date: Sun, 11 Sep 2022 20:49:40 +0530 Subject: [PATCH] Update: bug fixes --- README.md | 7 ++++--- dist/fad-0.1.0-py3-none-any.whl | Bin 3064 -> 3764 bytes dist/fad-0.1.0.tar.gz | Bin 2473 -> 3387 bytes dist/fad-0.1.1-py3-none-any.whl | Bin 0 -> 3764 bytes dist/fad-0.1.1.tar.gz | Bin 0 -> 3390 bytes fad/{anamoly_utils.py => anomaly_utils.py} | 14 +++++++------- fad/financial_ad.py | 4 ++-- pyproject.toml | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 dist/fad-0.1.1-py3-none-any.whl create mode 100644 dist/fad-0.1.1.tar.gz rename fad/{anamoly_utils.py => anomaly_utils.py} (86%) diff --git a/README.md b/README.md index 5891853..3558ad7 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ You can download the stock data and perform anomaly detection using a range of a ## Installation For installing the pre-release version use - +` pip install https://github.com/AchintyaX/fad/releases/download/v0.1.0/fad-0.1.0-py3-none-any.whl` + +## Usage 1. fetch_data - Used for fetching stock data using yahoo finance API and transforming it for anamoly detection : ``` In [1]: from fad import FinancialAnomalyDetector @@ -36,9 +39,7 @@ Out[6]: ``` -` pip install https://github.com/AchintyaX/fad/releases/download/v0.1.0/fad-0.1.0-py3-none-any.whl` - -## Usage +2. anamly_detection - Used to find anomalies in the data returning the dataframe along with plotting them in the time series The package has 2 primary methods - 1. diff --git a/dist/fad-0.1.0-py3-none-any.whl b/dist/fad-0.1.0-py3-none-any.whl index 6e9f7cf547eb1192e46fc872c149cbe15bf99660..600b5772b10dbc63410289d8481594bff1da757e 100644 GIT binary patch delta 2865 zcmY+GcQhLc8^%NI7`dvNnpG==qA_dlJxa9^lo&;+&?*`u_WaCfwHmG3N-JiSP%B2Q zpfzgL-m^*(^6KCfX>50S`-+UvxQPA*{P>^ZaTP7@e zwbDgMNr18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z?I|d|4k6?SD3{4~pnoeSSIs(K2az?nXkFzy=^QRr;F324AFl|%Sa~ZF;Ws1&8gUN% zDTW9>^dkepxr5Fr^4Ws&STpzW{nrkPz+WZ2=HFZEppYys$hi&>PQEh^QHqx@=TC?v z%8P|yBZTOULJ~mZQxtB1N4=_l+QtlchD<^~na0Ezc2J%SC4Vr>n2ywZI%`rO%NQ8| z`F#z9Xq19XB{VK1g|H~0HUTsX$fcKp0Aw5E4rC=KXKUtrgLngRRd5Q+``4O9$x1p2 z!-Iv0C`ckfJcFeI`-(!k9@T9GD#d^Y60#0@nEl5P7KM*{@&A7IZ%wR8&Hjg$*?#|T zC+#I3yc$4C=6``Y&hc6<2Qvjp@6;)kP&QM_=mCPthV~7ebU}%_r#aM36O(V~dlyp0 zlkThTDddAp70Z3!EvdE|s|@YH(N@-fV;WP#>_Yz8O%3V5(N@%dGgNOu{Xy7Ytzq}IjfnKEvu;kTdhJb(SN?w$r``1wel<6(Nvyastt-D39eoQgy`U_ZfP)1Apk}_iV z05osbe}6O5S^~z9Xj$*otFpH3p&uFlefj0@gZH1_ect`~Kb}~P{BPREe>-U(sU%9t z2frn!*&GiI3w_e1InWK1gSC>N<8=^_Xfwz6JJryKBy5{w2-?u0J^|)<%OR2W4YVQ8 z@f~La`ZYDJ!53|6b6nULdaLTYY{@9hlunQ5bASB#_&q)hA;r0*o_Yp`vhK=|FOfKp zND!#->;vKFYd8iJelnB#WIq(&m_2yJ{)0zYW+9a$7R$LVhT~qO7PyhfuI`X;z diff --git a/dist/fad-0.1.1-py3-none-any.whl b/dist/fad-0.1.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..a35d60333681232639b4550675f114d3bff245be GIT binary patch literal 3764 zcmZ`+c|4SB8y@>E*$END*olb}LL(X?YozQnVf5Lm(Ufh*mSicCR1A`RSCNrsj10!o z$PtA>ma>jyX85M>ob#P8-#PE|yMNF7{&8LRbN}A!e(w9WhqAGY0ssJRrYQh=Vuagu znQvgG?PFSix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ei=84a)S-Z^T%q9(8xutc$FA+!ws69SoHJ_Z;wnrY_&>yaPEk?3cs zVS1m1#u?*6&7imZ`>sFpDYPV;$Kx^nw7-XUB2e__aQux$hw|zQ$>%tPlVl;x@Au%F zEcxjL_*qN*$-FB*8Qz&u_7A=Amz)-NHHUy@it*mSFG8DuOkZ(#v$4=b>;fj$hDI zKW(Re+D`qno%(4z_0x9hr|r~F+dbk>+bMrdfdT~z6ev)jK!E}U3KS?%pg@5F1qu`> UP@q78g0B(&4}3B@2mp8h05fySbN~PV literal 0 HcmV?d00001 diff --git a/fad/anamoly_utils.py b/fad/anomaly_utils.py similarity index 86% rename from fad/anamoly_utils.py rename to fad/anomaly_utils.py index f13a2f7..ff89634 100644 --- a/fad/anamoly_utils.py +++ b/fad/anomaly_utils.py @@ -13,21 +13,21 @@ def seasonal_ad_detector(data: pd.DataFrame, print_plot: bool = True) -> Optional[pd.DataFrame]: seasonal_ad = SeasonalAD(c=seasonal_c, side=side) - anamolies = seasonal_ad.fit_detect(data) + anomalies = seasonal_ad.fit_detect(data) if print_plot == True: - print(plot(data, anomaly=anamolies, anomaly_color="orange", anomaly_tag="marker")) + print(plot(data, anomaly=anomalies, anomaly_color="orange", anomaly_tag="marker")) - return anamolies + return anomalies def min_cluster_detector(data: pd.DataFrame, print_plot: bool =True) -> Optional[pd.DataFrame]: - min_cluster_ad = MinClusterDetector(KMeans(n_clusters=3)) - anamolies = min_cluster_ad.fit_detect(data) + min_cluster_ad = MinClusterDetector(KMeans(n_clusters=n_clusters)) + anomalies = min_cluster_ad.fit_detect(data) if print_plot == True: - plot(data, anomaly=anamolies, ts_linewidth=1, ts_markersize=3, anomaly_color='red', anomaly_alpha=0.3, curve_group='all') + plot(data, anomaly=anomalies, ts_linewidth=1, ts_markersize=3, anomaly_color='red', anomaly_alpha=0.3, curve_group='all') - return anamolies + return anomalies def outlier_detector(data: pd.DataFrame, print_plot: bool = True) -> Optional[pd.DataFrame]: outlier_ad = OutlierDetector(LocalOutlierFactor(contamination=contamination)) diff --git a/fad/financial_ad.py b/fad/financial_ad.py index fd07c92..b408eee 100644 --- a/fad/financial_ad.py +++ b/fad/financial_ad.py @@ -1,7 +1,7 @@ import pandas as pd import yfinance as yf import numpy as np -from fad.anamoly_utils import seasonal_ad_detector, min_cluster_detector, outlier_detector, level_shift_detector, volatile_shift_detector +from fad.anomaly_utils import seasonal_ad_detector, min_cluster_detector, outlier_detector, level_shift_detector, volatile_shift_detector from adtk.data import validate_series @@ -30,7 +30,7 @@ def fetch_data(self, company_name: str, start_date: str, end_date: str) -> pd.Da return data - def anamoly_detect(self, data: pd.DataFrame, method: str = 'min_cluster_ad', print_plot: bool = True) -> pd.DataFrame: + def anomaly_detect(self, data: pd.DataFrame, method: str = 'min_cluster_ad', print_plot: bool = True) -> pd.DataFrame: detection_method = self.detector_map[method] anomalies = detection_method(data=data, print_plot=print_plot) diff --git a/pyproject.toml b/pyproject.toml index cb479fe..4d31cb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fad" -version = "0.1.0" +version = "0.1.1" description = "experimentation with anamoly detection" authors = ["Achintya Shankhdhar "] license = "MIT"