noshot 1.0.0__py3-none-any.whl → 2.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 (34) hide show
  1. noshot/data/ML TS XAI/TS/bill-charge.ipynb +239 -0
  2. noshot/data/ML TS XAI/{XAI/XAI 2/Exp-3 (EDA-loan).ipynb → TS/daily-min-temperatures.ipynb } +68 -50
  3. noshot/data/ML TS XAI/TS/data/bill-data.csv +21 -0
  4. noshot/data/ML TS XAI/TS/data/daily-min-temperatures.csv +3651 -0
  5. noshot/data/ML TS XAI/TS/data/monthly-sunspots.csv +2821 -0
  6. noshot/data/ML TS XAI/TS/monthly-sunspots.ipynb +241 -0
  7. {noshot-1.0.0.dist-info → noshot-2.0.0.dist-info}/METADATA +1 -1
  8. noshot-2.0.0.dist-info/RECORD +15 -0
  9. {noshot-1.0.0.dist-info → noshot-2.0.0.dist-info}/WHEEL +1 -1
  10. noshot/data/ML TS XAI/TS/10. Seasonal ARIMA Forecasting.ipynb +0 -246
  11. noshot/data/ML TS XAI/TS/11. Multivariate ARIMA Forecasting.ipynb +0 -228
  12. noshot/data/ML TS XAI/TS/6. ACF PACF.ipynb +0 -77
  13. noshot/data/ML TS XAI/TS/7. Differencing.ipynb +0 -167
  14. noshot/data/ML TS XAI/TS/8. ARMA Forecasting.ipynb +0 -197
  15. noshot/data/ML TS XAI/TS/9. ARIMA Forecasting.ipynb +0 -220
  16. noshot/data/ML TS XAI/XAI/XAI 1/EDA2_chipsdatset.ipynb +0 -633
  17. noshot/data/ML TS XAI/XAI/XAI 1/EDA_IRISH_8thjan.ipynb +0 -326
  18. noshot/data/ML TS XAI/XAI/XAI 1/XAI_EX1 MODEL BIAS (FINAL).ipynb +0 -487
  19. noshot/data/ML TS XAI/XAI/XAI 1/complete_guide_to_eda_on_text_data.ipynb +0 -845
  20. noshot/data/ML TS XAI/XAI/XAI 1/deepchecksframeworks.ipynb +0 -100
  21. noshot/data/ML TS XAI/XAI/XAI 1/deepexplainers (mnist).ipynb +0 -90
  22. noshot/data/ML TS XAI/XAI/XAI 1/guidedbackpropagation.ipynb +0 -203
  23. noshot/data/ML TS XAI/XAI/XAI 1/updated_image_EDA1_with_LRP.ipynb +0 -3998
  24. noshot/data/ML TS XAI/XAI/XAI 1/zebrastripes.ipynb +0 -271
  25. noshot/data/ML TS XAI/XAI/XAI 2/EXP_5.ipynb +0 -1545
  26. noshot/data/ML TS XAI/XAI/XAI 2/Exp-3 (EDA-movie).ipynb +0 -229
  27. noshot/data/ML TS XAI/XAI/XAI 2/Exp-4(Flower dataset).ipynb +0 -237
  28. noshot/data/ML TS XAI/XAI/XAI 2/Exp-4.ipynb +0 -241
  29. noshot/data/ML TS XAI/XAI/XAI 2/Exp_2.ipynb +0 -352
  30. noshot/data/ML TS XAI/XAI/XAI 2/Exp_7.ipynb +0 -110
  31. noshot/data/ML TS XAI/XAI/XAI 2/FeatureImportance_SensitivityAnalysis.ipynb +0 -708
  32. noshot-1.0.0.dist-info/RECORD +0 -32
  33. {noshot-1.0.0.dist-info → noshot-2.0.0.dist-info}/licenses/LICENSE.txt +0 -0
  34. {noshot-1.0.0.dist-info → noshot-2.0.0.dist-info}/top_level.txt +0 -0
@@ -1,220 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "id": "6e3f5839-6844-42c3-a57c-5e6324c7ee43",
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
- "from scipy import stats\n",
14
- "from statsmodels.graphics.tsaplots import plot_acf, plot_pacf\n",
15
- "from statsmodels.graphics.api import qqplot\n",
16
- "from statsmodels.tsa.arima.model import ARIMA\n",
17
- "from statsmodels.tsa.stattools import adfuller\n",
18
- "from statsmodels.api import tsa\n",
19
- "from sklearn.metrics import r2_score\n",
20
- "from sklearn.model_selection import TimeSeriesSplit\n",
21
- "import warnings\n",
22
- "warnings.filterwarnings('ignore')"
23
- ]
24
- },
25
- {
26
- "cell_type": "code",
27
- "execution_count": null,
28
- "id": "f32d68f1-db8f-4b74-b23e-2f3ad3b56eed",
29
- "metadata": {},
30
- "outputs": [],
31
- "source": [
32
- "df = pd.read_csv('monthly-sunspots.csv', index_col = 'YEAR')\n",
33
- "df"
34
- ]
35
- },
36
- {
37
- "cell_type": "code",
38
- "execution_count": null,
39
- "id": "500a40bd-7d8f-4d52-923a-ad76d590216f",
40
- "metadata": {
41
- "scrolled": true
42
- },
43
- "outputs": [],
44
- "source": [
45
- "df.plot(figsize=(15,8), color = 'purple')"
46
- ]
47
- },
48
- {
49
- "cell_type": "code",
50
- "execution_count": null,
51
- "id": "6dc6f56f-93bd-4506-b32a-e0f7361829b7",
52
- "metadata": {},
53
- "outputs": [],
54
- "source": [
55
- "result = adfuller(df['SUNACTIVITY'])\n",
56
- "display(result)"
57
- ]
58
- },
59
- {
60
- "cell_type": "code",
61
- "execution_count": null,
62
- "id": "13ece976-8c18-4a2e-b44a-49fa6bc6ff85",
63
- "metadata": {},
64
- "outputs": [],
65
- "source": [
66
- "pvalue = result[1]\n",
67
- "if pvalue < 0.05:\n",
68
- " print(\"Stationary\")\n",
69
- "else:\n",
70
- " print(\"Non Stationary\")"
71
- ]
72
- },
73
- {
74
- "cell_type": "code",
75
- "execution_count": null,
76
- "id": "d83cf3f0-244b-4961-8ff4-dedf97e5a766",
77
- "metadata": {},
78
- "outputs": [],
79
- "source": [
80
- "plot_acf(df['SUNACTIVITY'], lags = 40)\n",
81
- "plot_pacf(df['SUNACTIVITY'], lags = 40)\n",
82
- "plt.show()"
83
- ]
84
- },
85
- {
86
- "cell_type": "code",
87
- "execution_count": null,
88
- "id": "5dacfe47-b35b-46e4-a06f-6001040a6405",
89
- "metadata": {},
90
- "outputs": [],
91
- "source": [
92
- "model = ARIMA(list(df['SUNACTIVITY']), order = (1,0,1))\n",
93
- "result = model.fit()\n",
94
- "pred = result.predict()\n",
95
- "print(r2_score(df, pred))"
96
- ]
97
- },
98
- {
99
- "cell_type": "code",
100
- "execution_count": null,
101
- "id": "171168aa-f0a2-43f1-a195-72b9f3791a53",
102
- "metadata": {},
103
- "outputs": [],
104
- "source": [
105
- "plt.plot(list(df['SUNACTIVITY']))\n",
106
- "plt.plot(pred, linestyle = '--')\n",
107
- "plt.legend(['Actual Sunspots'], ['Predicted SUnspots'])\n",
108
- "plt.xlabel('Timesteps')\n",
109
- "plt.show()"
110
- ]
111
- },
112
- {
113
- "cell_type": "code",
114
- "execution_count": null,
115
- "id": "62e74f51-e0b4-4b22-856b-5a28838375b7",
116
- "metadata": {},
117
- "outputs": [],
118
- "source": [
119
- "ax = pd.Series(result.resid).hist()\n",
120
- "ax.set_xlabel('Residual')\n",
121
- "ax.set_ylabel('Number of Occurences')\n",
122
- "plt.show()"
123
- ]
124
- },
125
- {
126
- "cell_type": "code",
127
- "execution_count": null,
128
- "id": "1cac3ae4-d8f2-49c4-a04d-fabf5290977a",
129
- "metadata": {},
130
- "outputs": [],
131
- "source": [
132
- "result.summary()"
133
- ]
134
- },
135
- {
136
- "cell_type": "code",
137
- "execution_count": null,
138
- "id": "e3ae6db1-4b9c-4a9b-8286-b6484fabb348",
139
- "metadata": {},
140
- "outputs": [],
141
- "source": [
142
- "data_array = df.values\n",
143
- "avg_errors = []\n",
144
- "for p in range(1):\n",
145
- " for q in range(13):\n",
146
- " errors = []\n",
147
- " tscv = TimeSeriesSplit(test_size = 10)\n",
148
- " for train_index, test_index in tscv.split(data_array):\n",
149
- " x_train, x_test = data_array[train_index], data_array[test_index]\n",
150
- " x_test_orig = x_test\n",
151
- "\n",
152
- " fcst = []\n",
153
- " for stop in range(10):\n",
154
- " try:\n",
155
- " mod = ARIMA(x_train, order = (p,0,q))\n",
156
- " res = mod.fit()\n",
157
- " fcst.append(res.forecast(steps = 1))\n",
158
- " except:\n",
159
- " print(\"Error\")\n",
160
- " fcst.append(-9999999.)\n",
161
- " x_train = np.concatenate((x_train, x_test[0:1,]))\n",
162
- " x_test = x_test[1:]\n",
163
- " errors.append(r2_score(x_test_orig, fcst))\n",
164
- " pq_result = [p, q, np.mean(errors)]\n",
165
- " print(pq_result)\n",
166
- " avg_errors.append(pq_result)\n",
167
- "avg_errors = pd.DataFrame(avg_errors)\n",
168
- "avg_errors.columns = ['p', 'q', 'error']\n",
169
- "result = avg_errors.pivot(index = 'p', columns = 'q')"
170
- ]
171
- },
172
- {
173
- "cell_type": "code",
174
- "execution_count": null,
175
- "id": "f0882bbd-e5de-4249-b74c-9f96c6777205",
176
- "metadata": {},
177
- "outputs": [],
178
- "source": [
179
- "dta_array = df.values\n",
180
- "X_train, X_test = dta_array[:10], dta_array[-10:]\n",
181
- "X_test_orig = X_test\n",
182
- "\n",
183
- "fcst = []\n",
184
- "for step in range(10):\n",
185
- " mod = ARIMA(X_train, order = (10,0,9))\n",
186
- " res = mod.fit()\n",
187
- " fcst.append(res.forecast(steps = 1))\n",
188
- " X_train = np.concatenate((X_train, X_test[0:1,:]))\n",
189
- " X_test = X_test[1:]\n",
190
- "\n",
191
- "plt.plot(X_test_orig)\n",
192
- "plt.plot(fcst)\n",
193
- "plt.legend(['Actual Sunspots', 'Predicted Sunspots'])\n",
194
- "plt.xlabel('Time Steps of Test Data')\n",
195
- "plt.show()"
196
- ]
197
- }
198
- ],
199
- "metadata": {
200
- "kernelspec": {
201
- "display_name": "Python 3 (ipykernel)",
202
- "language": "python",
203
- "name": "python3"
204
- },
205
- "language_info": {
206
- "codemirror_mode": {
207
- "name": "ipython",
208
- "version": 3
209
- },
210
- "file_extension": ".py",
211
- "mimetype": "text/x-python",
212
- "name": "python",
213
- "nbconvert_exporter": "python",
214
- "pygments_lexer": "ipython3",
215
- "version": "3.12.4"
216
- }
217
- },
218
- "nbformat": 4,
219
- "nbformat_minor": 5
220
- }