noshot 2.0.0__py3-none-any.whl → 4.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. noshot/data/ML TS XAI/ML/ML Lab CIA 2 (I Found Only This Check)/Copy_of_Pistachio_csv.ipynb +269 -0
  2. noshot/data/ML TS XAI/ML/ML Lab CIA 2 (I Found Only This Check)/weatherAUS.ipynb +155 -0
  3. noshot/data/ML TS XAI/ML/Main/1. EDA-PCA (Balance Scale Dataset).ipynb +139 -0
  4. noshot/data/ML TS XAI/ML/Main/1. EDA-PCA (Rice Dataset).ipynb +181 -0
  5. noshot/data/ML TS XAI/ML/Main/10. HMM Veterbi.ipynb +228 -0
  6. noshot/data/ML TS XAI/ML/Main/2. KNN (Balance Scale Dataset).ipynb +117 -0
  7. noshot/data/ML TS XAI/ML/Main/2. KNN (Iris Dataset).ipynb +165 -0
  8. noshot/data/ML TS XAI/ML/Main/2. KNN (Sobar-72 Dataset).ipynb +251 -0
  9. noshot/data/ML TS XAI/ML/Main/3. LDA (Balance Scale Dataset).ipynb +78 -0
  10. noshot/data/ML TS XAI/ML/Main/3. LDA (NPHA Doctor Visits Dataset).ipynb +114 -0
  11. noshot/data/ML TS XAI/ML/Main/4. Linear Regression (Machine Dataset).ipynb +115 -0
  12. noshot/data/ML TS XAI/ML/Main/4. Linear Regression (Real Estate Dataset).ipynb +159 -0
  13. noshot/data/ML TS XAI/ML/Main/5. Logistic Regression (Magic04 Dataset).ipynb +200 -0
  14. noshot/data/ML TS XAI/ML/Main/5. Logistic Regression (Wine Dataset).ipynb +112 -0
  15. noshot/data/ML TS XAI/ML/Main/6. Naive Bayes Classifier (Agaricus Lepiota Dataset).ipynb +153 -0
  16. noshot/data/ML TS XAI/ML/Main/6. Naive Bayes Classifier (Wine Dataset).ipynb +89 -0
  17. noshot/data/ML TS XAI/ML/Main/7. SVM (Rice Dataset).ipynb +208 -0
  18. noshot/data/ML TS XAI/ML/Main/8. FeedForward NN (Sobar72 Dataset).ipynb +260 -0
  19. noshot/data/ML TS XAI/ML/Main/9. CNN (Cifar10 Dataset).ipynb +238 -0
  20. noshot/data/ML TS XAI/ML/Main/data/agaricus-lepiota.data +8124 -0
  21. noshot/data/ML TS XAI/ML/Main/data/balance-scale.txt +625 -0
  22. noshot/data/ML TS XAI/ML/Main/data/doctor-visits.csv +715 -0
  23. noshot/data/ML TS XAI/ML/Main/data/iris.csv +151 -0
  24. noshot/data/ML TS XAI/ML/Main/data/machine-data.csv +210 -0
  25. noshot/data/ML TS XAI/ML/Main/data/magic04.data +19020 -0
  26. noshot/data/ML TS XAI/ML/Main/data/real-estate.xlsx +0 -0
  27. noshot/data/ML TS XAI/ML/Main/data/rice.arff +3826 -0
  28. noshot/data/ML TS XAI/ML/Main/data/sobar-72.csv +73 -0
  29. noshot/data/ML TS XAI/ML/Main/data/wine-dataset.csv +179 -0
  30. noshot/data/ML TS XAI/ML/Other Codes.ipynb +158 -0
  31. noshot/data/ML TS XAI/ML/Rolls Royce AllinOne.ipynb +691 -0
  32. {noshot-2.0.0.dist-info → noshot-4.0.0.dist-info}/METADATA +1 -1
  33. noshot-4.0.0.dist-info/RECORD +40 -0
  34. {noshot-2.0.0.dist-info → noshot-4.0.0.dist-info}/WHEEL +1 -1
  35. noshot/data/ML TS XAI/TS/bill-charge.ipynb +0 -239
  36. noshot/data/ML TS XAI/TS/daily-min-temperatures.ipynb +0 -239
  37. noshot/data/ML TS XAI/TS/data/bill-data.csv +0 -21
  38. noshot/data/ML TS XAI/TS/data/daily-min-temperatures.csv +0 -3651
  39. noshot/data/ML TS XAI/TS/data/monthly-sunspots.csv +0 -2821
  40. noshot/data/ML TS XAI/TS/monthly-sunspots.ipynb +0 -241
  41. noshot-2.0.0.dist-info/RECORD +0 -15
  42. {noshot-2.0.0.dist-info → noshot-4.0.0.dist-info}/licenses/LICENSE.txt +0 -0
  43. {noshot-2.0.0.dist-info → noshot-4.0.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: noshot
3
- Version: 2.0.0
3
+ Version: 4.0.0
4
4
  Summary: Support library for Artificial Intelligence, Machine Learning and Data Science tools
5
5
  Author: Tim Stan S
6
6
  License: MIT
@@ -0,0 +1,40 @@
1
+ noshot/__init__.py,sha256=000R40tii8lDFU8C1fBaD3SOnxD0PWRNWZU-km49YrU,21
2
+ noshot/main.py,sha256=zXegIqjJPARlPnQMS-B2dAENcvyaZkNwmue63Gm8lHU,663
3
+ noshot/data/ML TS XAI/ML/Other Codes.ipynb,sha256=e2a_1CTXt7HuXRFUGRkeJyE9ZsdmHiVT5RzqI1AyTDI,4876
4
+ noshot/data/ML TS XAI/ML/Rolls Royce AllinOne.ipynb,sha256=dQ3HgLix6HLqPltFiPrElmEdYAsvR6flDpHEIjcngp4,24774
5
+ noshot/data/ML TS XAI/ML/ML Lab CIA 2 (I Found Only This Check)/Copy_of_Pistachio_csv.ipynb,sha256=yJh1XjDCpMsqVSzsepJafjUY8XaL6jLhUKC31WOrwuI,150571
6
+ noshot/data/ML TS XAI/ML/ML Lab CIA 2 (I Found Only This Check)/weatherAUS.ipynb,sha256=DcLapOb2E-1UM0N_ecy8ZKrJnfnEsz8BvKHcmuZBfgc,5795
7
+ noshot/data/ML TS XAI/ML/Main/1. EDA-PCA (Balance Scale Dataset).ipynb,sha256=QlOFmpbc2IJxWUJNd5Mo4p0X-x38l_wTrHxKeRPO3v0,3303
8
+ noshot/data/ML TS XAI/ML/Main/1. EDA-PCA (Rice Dataset).ipynb,sha256=1rp60fJyQl0bxzFWeJb6XR8VRtlQeonv9Yw5_9pvIH8,4133
9
+ noshot/data/ML TS XAI/ML/Main/10. HMM Veterbi.ipynb,sha256=E7fgiDWSvKH_1Wgp5ScGVvbykN4FP4IWFuld8qBJcHs,7266
10
+ noshot/data/ML TS XAI/ML/Main/2. KNN (Balance Scale Dataset).ipynb,sha256=tbkkRm6xHnmM-K8cRpnK8LH1pUmQl30bdyo0dFSNFcw,2988
11
+ noshot/data/ML TS XAI/ML/Main/2. KNN (Iris Dataset).ipynb,sha256=8s0CpQ_VifCzQEgh2KAbh1hB-49j1QvnVBTfBJSkKvQ,4549
12
+ noshot/data/ML TS XAI/ML/Main/2. KNN (Sobar-72 Dataset).ipynb,sha256=OLwRb6dcAzH0om3O3GCo7_ebBRcQs4IwIh9fN2Qf378,6488
13
+ noshot/data/ML TS XAI/ML/Main/3. LDA (Balance Scale Dataset).ipynb,sha256=Z3zwZQKJmvCEgzTWN1OqgiOAF9Lw5oLIY1A63SRJ5tg,2101
14
+ noshot/data/ML TS XAI/ML/Main/3. LDA (NPHA Doctor Visits Dataset).ipynb,sha256=N_IFGBAckF8vJI0lPPbZ1soG50B1_IVyACCyU7jvo3U,2651
15
+ noshot/data/ML TS XAI/ML/Main/4. Linear Regression (Machine Dataset).ipynb,sha256=PxFEgyFi6n5nURhtjeT__OP5T-UsggOI9RfBKfpDNBo,3081
16
+ noshot/data/ML TS XAI/ML/Main/4. Linear Regression (Real Estate Dataset).ipynb,sha256=QR18b8OAO4GAAHT4Cn8ng1rKZlQNhz8P_qfhopIj8m8,3963
17
+ noshot/data/ML TS XAI/ML/Main/5. Logistic Regression (Magic04 Dataset).ipynb,sha256=iPGBdHFobZvpuVVsfB_DcxNZvWg_BMiciz5Ro1I5Y48,4266
18
+ noshot/data/ML TS XAI/ML/Main/5. Logistic Regression (Wine Dataset).ipynb,sha256=YphX35eCBBWu5sCSLS6bw__Em4gbwAzOW49z_Zv-tRs,2668
19
+ noshot/data/ML TS XAI/ML/Main/6. Naive Bayes Classifier (Agaricus Lepiota Dataset).ipynb,sha256=Ewwn2gWNd8C48y8sAk_fG5JHUKBx5pOJMq9aNF-8Cpw,3476
20
+ noshot/data/ML TS XAI/ML/Main/6. Naive Bayes Classifier (Wine Dataset).ipynb,sha256=Ile_WuRAt8Is1HbKdDXu-ogHvQRNBGyxpd8OWauEEek,2058
21
+ noshot/data/ML TS XAI/ML/Main/7. SVM (Rice Dataset).ipynb,sha256=FQo3m4S57Js_n395Fj3VN7nwgMRiA9n8tWqd9i6xYsg,5263
22
+ noshot/data/ML TS XAI/ML/Main/8. FeedForward NN (Sobar72 Dataset).ipynb,sha256=s0T9Fj9-9h8nO6JYmGXKge-y-4ajve1rgt_mlqUgGG0,7258
23
+ noshot/data/ML TS XAI/ML/Main/9. CNN (Cifar10 Dataset).ipynb,sha256=cn-He6Ly_x4pNU_yqFhRs5pv2LqcEoJgHRyYHLttDUs,6424
24
+ noshot/data/ML TS XAI/ML/Main/data/agaricus-lepiota.data,sha256=5l0IIDBQGj68vNfJ98caqdKP3_9GO_TPRxaj_hOsNg4,373704
25
+ noshot/data/ML TS XAI/ML/Main/data/balance-scale.txt,sha256=GPtYUxxyeHEcVqK6AYAZnxzGkIsmEI4lg3cdV-YCoBI,6873
26
+ noshot/data/ML TS XAI/ML/Main/data/doctor-visits.csv,sha256=J9eKD_hIHWw13-jSi2n03ATkIHd_n_YZVIMbBoGF_rI,21769
27
+ noshot/data/ML TS XAI/ML/Main/data/iris.csv,sha256=vYxzzs8E2Gra0TwylbMa4cU6WzeIQsVgGXq9YiplnKU,2927
28
+ noshot/data/ML TS XAI/ML/Main/data/machine-data.csv,sha256=ibOegRM_3qX7IDexXCE5cxvck-1Kz-iQ-A6KKZ9fExA,8956
29
+ noshot/data/ML TS XAI/ML/Main/data/magic04.data,sha256=6TFLfr1LS1mjs9ZfcxZmOWN3exakZ4aHdlHbuqZAs2o,1477391
30
+ noshot/data/ML TS XAI/ML/Main/data/real-estate.xlsx,sha256=1WNNdj5P4TvawWTyl2zAQGTQTRornjUr3BrtV1rhiZQ,30552
31
+ noshot/data/ML TS XAI/ML/Main/data/rice.arff,sha256=Gvl4gxAMid4uopcveijUKPTxwUcRph3vwLBWnp62VmU,427635
32
+ noshot/data/ML TS XAI/ML/Main/data/sobar-72.csv,sha256=RTTPBVbPcvXDFXnzRXWKkkjGX6RliTDjaJviB2648dc,4102
33
+ noshot/data/ML TS XAI/ML/Main/data/wine-dataset.csv,sha256=LM6dldfZUWWlkbhHQdFdMwD2hioTWijjYBJJ1C8wMFY,12440
34
+ noshot/utils/__init__.py,sha256=QVrN1ZpzPXxZqDOqot5-t_ulFjZXVx7Cvr-Is9AK0po,110
35
+ noshot/utils/shell_utils.py,sha256=-XfgYlNQlULa_rRJ3vsfTns4m_jiueGEj396J_y0Gus,2611
36
+ noshot-4.0.0.dist-info/licenses/LICENSE.txt,sha256=fgCruaVm5cUjFGOeEoGIimT6nnUunBqcNZHpGzK8TSw,1086
37
+ noshot-4.0.0.dist-info/METADATA,sha256=yk-esBvPa5kN6UEtE4i-bHqgFnHzmzB0zq-kaPzB2qQ,2573
38
+ noshot-4.0.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
39
+ noshot-4.0.0.dist-info/top_level.txt,sha256=UL-c0HffdRwohz-y9icY_rnY48pQDdxGcBsgyCKh2Q8,7
40
+ noshot-4.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,239 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "id": "3d63e9c0",
7
- "metadata": {},
8
- "outputs": [],
9
- "source": [
10
- "import pandas as pd\n",
11
- "import numpy as np\n",
12
- "import matplotlib.pyplot as plt\n",
13
- "import seaborn as sns\n",
14
- "from statsmodels.graphics.tsaplots import plot_acf,plot_pacf\n",
15
- "from statsmodels.tsa.stattools import adfuller\n",
16
- "from statsmodels.tsa.arima.model import ARIMA\n",
17
- "from statsmodels.tsa.statespace import sarimax\n",
18
- "from sklearn.metrics import r2_score,mean_squared_error"
19
- ]
20
- },
21
- {
22
- "cell_type": "code",
23
- "execution_count": null,
24
- "id": "411787bc",
25
- "metadata": {},
26
- "outputs": [],
27
- "source": [
28
- "df=pd.read_csv('data/bill-data.csv')\n",
29
- "display(df.head())"
30
- ]
31
- },
32
- {
33
- "cell_type": "code",
34
- "execution_count": null,
35
- "id": "af7abd2d",
36
- "metadata": {},
37
- "outputs": [],
38
- "source": [
39
- "df['Date']=pd.to_datetime(df['Date'])\n",
40
- "df"
41
- ]
42
- },
43
- {
44
- "cell_type": "code",
45
- "execution_count": null,
46
- "id": "10b20a75",
47
- "metadata": {},
48
- "outputs": [],
49
- "source": [
50
- "print(df.isnull().sum())"
51
- ]
52
- },
53
- {
54
- "cell_type": "code",
55
- "execution_count": null,
56
- "id": "d8a439ba",
57
- "metadata": {},
58
- "outputs": [],
59
- "source": [
60
- "display(df.describe())"
61
- ]
62
- },
63
- {
64
- "cell_type": "code",
65
- "execution_count": null,
66
- "id": "d7ef84ea",
67
- "metadata": {},
68
- "outputs": [],
69
- "source": [
70
- "df.info()"
71
- ]
72
- },
73
- {
74
- "cell_type": "code",
75
- "execution_count": null,
76
- "id": "f79409e8",
77
- "metadata": {},
78
- "outputs": [],
79
- "source": [
80
- "plt.plot(df['Bill Charge'],label='Bill Charge')\n",
81
- "plt.xlabel('Date')\n",
82
- "plt.ylabel(\"Bill Charge\")\n",
83
- "plt.legend()\n",
84
- "plt.title('Bill Charge By Date')\n",
85
- "plt.show()"
86
- ]
87
- },
88
- {
89
- "cell_type": "code",
90
- "execution_count": null,
91
- "id": "fbf0d907",
92
- "metadata": {},
93
- "outputs": [],
94
- "source": [
95
- "def stationarity_test(data):\n",
96
- " data=adfuller(data)\n",
97
- " print(f'Result : The Data is {\"not\" if data[1]<0.05 else \"\"} Stationary')\n",
98
- "\n",
99
- "stationarity_test(df['Bill Charge'])"
100
- ]
101
- },
102
- {
103
- "cell_type": "code",
104
- "execution_count": null,
105
- "id": "7965415d",
106
- "metadata": {},
107
- "outputs": [],
108
- "source": [
109
- "plot_acf(df['Bill Charge'],lags=7)\n",
110
- "plot_pacf(df['Bill Charge'],lags=7)\n",
111
- "plt.show()"
112
- ]
113
- },
114
- {
115
- "cell_type": "code",
116
- "execution_count": null,
117
- "id": "7c5c5023",
118
- "metadata": {},
119
- "outputs": [],
120
- "source": [
121
- "arma_model=ARIMA(df['Bill Charge'],order=(2,0,0))\n",
122
- "arma_fit=arma_model.fit()\n",
123
- "display(arma_fit.summary())"
124
- ]
125
- },
126
- {
127
- "cell_type": "code",
128
- "execution_count": null,
129
- "id": "46da16b9",
130
- "metadata": {},
131
- "outputs": [],
132
- "source": [
133
- "arima_model=ARIMA(df['Bill Charge'],order=(2,1,0))\n",
134
- "arima_fit=arima_model.fit()\n",
135
- "display(arima_fit.summary())"
136
- ]
137
- },
138
- {
139
- "cell_type": "code",
140
- "execution_count": null,
141
- "id": "1e629e66",
142
- "metadata": {},
143
- "outputs": [],
144
- "source": [
145
- "sarima_model=sarimax.SARIMAX(df['Bill Charge'],order=(1,1,0),seasonal_order=(1,2,0,4))\n",
146
- "sarima_fit=sarima_model.fit()\n",
147
- "display(sarima_fit.summary())"
148
- ]
149
- },
150
- {
151
- "cell_type": "code",
152
- "execution_count": null,
153
- "id": "e3ae7519",
154
- "metadata": {},
155
- "outputs": [],
156
- "source": [
157
- "display(arma_fit.aic,arima_fit.aic,sarima_fit.aic)"
158
- ]
159
- },
160
- {
161
- "cell_type": "code",
162
- "execution_count": null,
163
- "id": "e9e40bbd",
164
- "metadata": {},
165
- "outputs": [],
166
- "source": [
167
- "display(arma_fit.bic,arima_fit.bic,sarima_fit.bic)"
168
- ]
169
- },
170
- {
171
- "cell_type": "code",
172
- "execution_count": null,
173
- "id": "8773dcb6",
174
- "metadata": {},
175
- "outputs": [],
176
- "source": [
177
- "display(arma_fit.hqic,arima_fit.hqic,sarima_fit.hqic)"
178
- ]
179
- },
180
- {
181
- "cell_type": "code",
182
- "execution_count": null,
183
- "id": "50ca8a19",
184
- "metadata": {},
185
- "outputs": [],
186
- "source": [
187
- "sarima_fit.resid.plot(color='teal')\n",
188
- "plt.title('Residual Plot')\n",
189
- "plt.show()"
190
- ]
191
- },
192
- {
193
- "cell_type": "code",
194
- "execution_count": null,
195
- "id": "6b6ddce5",
196
- "metadata": {},
197
- "outputs": [],
198
- "source": [
199
- "plt.plot(df['Bill Charge'],label='Original',color='blue')\n",
200
- "plt.plot(sarima_fit.predict(),label='Forecast',color='red')\n",
201
- "plt.title(\"Forecast\")\n",
202
- "plt.legend()\n",
203
- "plt.show()"
204
- ]
205
- },
206
- {
207
- "cell_type": "code",
208
- "execution_count": null,
209
- "id": "d3839c19",
210
- "metadata": {},
211
- "outputs": [],
212
- "source": [
213
- "print(f\"r2_Score : {r2_score(df['Bill Charge'],sarima_fit.predict())}\")\n",
214
- "print(f\"Mean Squared Error : {mean_squared_error(df['Bill Charge'],sarima_fit.predict())}\")"
215
- ]
216
- }
217
- ],
218
- "metadata": {
219
- "kernelspec": {
220
- "display_name": "Python 3 (ipykernel)",
221
- "language": "python",
222
- "name": "python3"
223
- },
224
- "language_info": {
225
- "codemirror_mode": {
226
- "name": "ipython",
227
- "version": 3
228
- },
229
- "file_extension": ".py",
230
- "mimetype": "text/x-python",
231
- "name": "python",
232
- "nbconvert_exporter": "python",
233
- "pygments_lexer": "ipython3",
234
- "version": "3.12.4"
235
- }
236
- },
237
- "nbformat": 4,
238
- "nbformat_minor": 5
239
- }
@@ -1,239 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "id": "3d63e9c0",
7
- "metadata": {},
8
- "outputs": [],
9
- "source": [
10
- "import pandas as pd\n",
11
- "import numpy as np\n",
12
- "import matplotlib.pyplot as plt\n",
13
- "import seaborn as sns\n",
14
- "from statsmodels.graphics.tsaplots import plot_acf,plot_pacf\n",
15
- "from statsmodels.tsa.stattools import adfuller\n",
16
- "from statsmodels.tsa.arima.model import ARIMA\n",
17
- "from statsmodels.tsa.statespace import sarimax\n",
18
- "from sklearn.metrics import r2_score,mean_squared_error"
19
- ]
20
- },
21
- {
22
- "cell_type": "code",
23
- "execution_count": null,
24
- "id": "411787bc",
25
- "metadata": {},
26
- "outputs": [],
27
- "source": [
28
- "df=pd.read_csv('data/daily-min-temperatures.csv')\n",
29
- "display(df.head())"
30
- ]
31
- },
32
- {
33
- "cell_type": "code",
34
- "execution_count": null,
35
- "id": "af7abd2d",
36
- "metadata": {},
37
- "outputs": [],
38
- "source": [
39
- "df['Date']=pd.to_datetime(df['Date'])\n",
40
- "df"
41
- ]
42
- },
43
- {
44
- "cell_type": "code",
45
- "execution_count": null,
46
- "id": "10b20a75",
47
- "metadata": {},
48
- "outputs": [],
49
- "source": [
50
- "print(df.isnull().sum())"
51
- ]
52
- },
53
- {
54
- "cell_type": "code",
55
- "execution_count": null,
56
- "id": "d8a439ba",
57
- "metadata": {},
58
- "outputs": [],
59
- "source": [
60
- "display(df.describe())"
61
- ]
62
- },
63
- {
64
- "cell_type": "code",
65
- "execution_count": null,
66
- "id": "d7ef84ea",
67
- "metadata": {},
68
- "outputs": [],
69
- "source": [
70
- "df.info()"
71
- ]
72
- },
73
- {
74
- "cell_type": "code",
75
- "execution_count": null,
76
- "id": "f79409e8",
77
- "metadata": {},
78
- "outputs": [],
79
- "source": [
80
- "plt.plot(df['Temp'],label='Temp')\n",
81
- "plt.xlabel('Date')\n",
82
- "plt.ylabel(\"Temp\")\n",
83
- "plt.legend()\n",
84
- "plt.title('Temp By Date')\n",
85
- "plt.show()"
86
- ]
87
- },
88
- {
89
- "cell_type": "code",
90
- "execution_count": null,
91
- "id": "fbf0d907",
92
- "metadata": {},
93
- "outputs": [],
94
- "source": [
95
- "def stationarity_test(data):\n",
96
- " data=adfuller(data)\n",
97
- " print(f'Result : The Data is {\"not\" if data[1]<0.05 else \"\"} Stationary')\n",
98
- "\n",
99
- "stationarity_test(df['Temp'])"
100
- ]
101
- },
102
- {
103
- "cell_type": "code",
104
- "execution_count": null,
105
- "id": "7965415d",
106
- "metadata": {},
107
- "outputs": [],
108
- "source": [
109
- "plot_acf(df['Temp'],lags=7)\n",
110
- "plot_pacf(df['Temp'],lags=7)\n",
111
- "plt.show()"
112
- ]
113
- },
114
- {
115
- "cell_type": "code",
116
- "execution_count": null,
117
- "id": "7c5c5023",
118
- "metadata": {},
119
- "outputs": [],
120
- "source": [
121
- "arma_model=ARIMA(df['Temp'],order=(2,0,0))\n",
122
- "arma_fit=arma_model.fit()\n",
123
- "display(arma_fit.summary())"
124
- ]
125
- },
126
- {
127
- "cell_type": "code",
128
- "execution_count": null,
129
- "id": "46da16b9",
130
- "metadata": {},
131
- "outputs": [],
132
- "source": [
133
- "arima_model=ARIMA(df['Temp'],order=(2,1,0))\n",
134
- "arima_fit=arima_model.fit()\n",
135
- "display(arima_fit.summary())"
136
- ]
137
- },
138
- {
139
- "cell_type": "code",
140
- "execution_count": null,
141
- "id": "1e629e66",
142
- "metadata": {},
143
- "outputs": [],
144
- "source": [
145
- "sarima_model=sarimax.SARIMAX(df['Temp'],order=(1,1,0),seasonal_order=(1,2,0,4))\n",
146
- "sarima_fit=sarima_model.fit()\n",
147
- "display(sarima_fit.summary())"
148
- ]
149
- },
150
- {
151
- "cell_type": "code",
152
- "execution_count": null,
153
- "id": "e3ae7519",
154
- "metadata": {},
155
- "outputs": [],
156
- "source": [
157
- "display(arma_fit.aic,arima_fit.aic,sarima_fit.aic)"
158
- ]
159
- },
160
- {
161
- "cell_type": "code",
162
- "execution_count": null,
163
- "id": "e9e40bbd",
164
- "metadata": {},
165
- "outputs": [],
166
- "source": [
167
- "display(arma_fit.bic,arima_fit.bic,sarima_fit.bic)"
168
- ]
169
- },
170
- {
171
- "cell_type": "code",
172
- "execution_count": null,
173
- "id": "8773dcb6",
174
- "metadata": {},
175
- "outputs": [],
176
- "source": [
177
- "display(arma_fit.hqic,arima_fit.hqic,sarima_fit.hqic)"
178
- ]
179
- },
180
- {
181
- "cell_type": "code",
182
- "execution_count": null,
183
- "id": "50ca8a19",
184
- "metadata": {},
185
- "outputs": [],
186
- "source": [
187
- "arma_fit.resid.plot(color='teal')\n",
188
- "plt.title('Residual Plot')\n",
189
- "plt.show()"
190
- ]
191
- },
192
- {
193
- "cell_type": "code",
194
- "execution_count": null,
195
- "id": "6b6ddce5",
196
- "metadata": {},
197
- "outputs": [],
198
- "source": [
199
- "plt.plot(df['Temp'],label='Original',color='blue')\n",
200
- "plt.plot(arma_fit.predict(),label='Forecast',color='red')\n",
201
- "plt.title(\"Forecast\")\n",
202
- "plt.legend()\n",
203
- "plt.show()"
204
- ]
205
- },
206
- {
207
- "cell_type": "code",
208
- "execution_count": null,
209
- "id": "d3839c19",
210
- "metadata": {},
211
- "outputs": [],
212
- "source": [
213
- "print(f\"r2_Score : {r2_score(df['Temp'],arma_fit.predict())}\")\n",
214
- "print(f\"Mean Squared Error : {mean_squared_error(df['Temp'],arma_fit.predict())}\")"
215
- ]
216
- }
217
- ],
218
- "metadata": {
219
- "kernelspec": {
220
- "display_name": "Python 3 (ipykernel)",
221
- "language": "python",
222
- "name": "python3"
223
- },
224
- "language_info": {
225
- "codemirror_mode": {
226
- "name": "ipython",
227
- "version": 3
228
- },
229
- "file_extension": ".py",
230
- "mimetype": "text/x-python",
231
- "name": "python",
232
- "nbconvert_exporter": "python",
233
- "pygments_lexer": "ipython3",
234
- "version": "3.12.4"
235
- }
236
- },
237
- "nbformat": 4,
238
- "nbformat_minor": 5
239
- }
@@ -1,21 +0,0 @@
1
- Date,Patient Name,Age,Bill Charge
2
- 1/1/2023,Bob,33,100.5
3
- 1/4/2023,Bob,24,250
4
- 1/7/2023,Bob,56,75
5
- 1/7/2023,Eve,40,300
6
- 1/9/2023,Charlie,40,150.5
7
- 1/10/2023,Charlie,24,200
8
- 1/11/2023,Bob,40,175
9
- 1/11/2023,Eve,40,400
10
- 1/11/2023,Bob,40,120
11
- 1/12/2023,Charlie,42,180
12
- 1/14/2023,Charlie,24,90
13
- 1/17/2023,Alice,33,50
14
- 1/18/2023,Eve,24,25
15
- 1/18/2023,Diana,24,75
16
- 1/20/2023,Eve,40,325
17
- 1/21/2023,Bob,24,60
18
- 1/21/2023,Diana,56,60
19
- 1/26/2023,Bob,42,100
20
- 1/29/2023,Diana,40,250
21
- 1/30/2023,Alice,33,40