|
35 | 35 | "metadata": {},
|
36 | 36 | "outputs": [],
|
37 | 37 | "source": [
|
38 |
| - "NYC = pd.read_pickle('./datasets/air-quality-reports/aggregates/NYC.pkl')" |
| 38 | + "NYC = pd.read_pickle('../datasets/air-quality-reports/aggregates/NYC/NYC.pkl')" |
39 | 39 | ]
|
40 | 40 | },
|
41 | 41 | {
|
|
197 | 197 | "predictions = test.copy(deep=True)"
|
198 | 198 | ]
|
199 | 199 | },
|
200 |
| - { |
201 |
| - "cell_type": "code", |
202 |
| - "execution_count": null, |
203 |
| - "id": "bce298b6-7219-4770-bc60-fcc0d36dc9cf", |
204 |
| - "metadata": {}, |
205 |
| - "outputs": [], |
206 |
| - "source": [] |
207 |
| - }, |
208 | 200 | {
|
209 | 201 | "cell_type": "code",
|
210 | 202 | "execution_count": 8,
|
|
238 | 230 | "execution_count": 9,
|
239 | 231 | "id": "afe217b1-04ad-447a-a7bf-0d1f9fa8ea92",
|
240 | 232 | "metadata": {
|
| 233 | + "collapsed": true, |
| 234 | + "jupyter": { |
| 235 | + "outputs_hidden": true |
| 236 | + }, |
241 | 237 | "tags": []
|
242 | 238 | },
|
243 | 239 | "outputs": [
|
|
262 | 258 | " <th>Seasonal:</th> <td>Multiplicative</td> <th> AICC </th> <td>11052.040</td> \n",
|
263 | 259 | "</tr>\n",
|
264 | 260 | "<tr>\n",
|
265 |
| - " <th>Seasonal Periods:</th> <td>365</td> <th> Date: </th> <td>Wed, 19 May 2021</td>\n", |
| 261 | + " <th>Seasonal Periods:</th> <td>365</td> <th> Date: </th> <td>Fri, 21 May 2021</td>\n", |
266 | 262 | "</tr>\n",
|
267 | 263 | "<tr>\n",
|
268 |
| - " <th>Box-Cox:</th> <td>False</td> <th> Time: </th> <td>10:21:59</td> \n", |
| 264 | + " <th>Box-Cox:</th> <td>False</td> <th> Time: </th> <td>12:02:51</td> \n", |
269 | 265 | "</tr>\n",
|
270 | 266 | "<tr>\n",
|
271 | 267 | " <th>Box-Cox Coeff.:</th> <td>None</td> <th> </th> <td> </td> \n",
|
|
1397 | 1393 | "Optimized: True AIC 10862.202\n",
|
1398 | 1394 | "Trend: Multiplicative BIC 12895.349\n",
|
1399 | 1395 | "Seasonal: Multiplicative AICC 11052.040\n",
|
1400 |
| - "Seasonal Periods: 365 Date: Wed, 19 May 2021\n", |
1401 |
| - "Box-Cox: False Time: 10:21:59\n", |
| 1396 | + "Seasonal Periods: 365 Date: Fri, 21 May 2021\n", |
| 1397 | + "Box-Cox: False Time: 12:02:51\n", |
1402 | 1398 | "Box-Cox Coeff.: None \n",
|
1403 | 1399 | "==================================================================================\n",
|
1404 | 1400 | " coeff code optimized \n",
|
|
1861 | 1857 | "predictions['hw']"
|
1862 | 1858 | ]
|
1863 | 1859 | },
|
| 1860 | + { |
| 1861 | + "cell_type": "markdown", |
| 1862 | + "id": "b439e2ed-c201-4139-bc18-67bb0aceeee8", |
| 1863 | + "metadata": {}, |
| 1864 | + "source": [ |
| 1865 | + "### Visualize the predictions" |
| 1866 | + ] |
| 1867 | + }, |
1864 | 1868 | {
|
1865 | 1869 | "cell_type": "code",
|
1866 | 1870 | "execution_count": 34,
|
|
1897 | 1901 | "## Gonna try weekly now"
|
1898 | 1902 | ]
|
1899 | 1903 | },
|
| 1904 | + { |
| 1905 | + "cell_type": "markdown", |
| 1906 | + "id": "ef7d2d94-91da-4cb5-99b3-1673e411425d", |
| 1907 | + "metadata": {}, |
| 1908 | + "source": [ |
| 1909 | + "### Resample the data to be weekly" |
| 1910 | + ] |
| 1911 | + }, |
1900 | 1912 | {
|
1901 | 1913 | "cell_type": "code",
|
1902 | 1914 | "execution_count": 14,
|
|
2340 | 2352 | "weekly_preds['hw'] = hw2.forecast(len(test_wk))"
|
2341 | 2353 | ]
|
2342 | 2354 | },
|
| 2355 | + { |
| 2356 | + "cell_type": "markdown", |
| 2357 | + "id": "7366bf80-357e-43f0-8490-367080cf5ac2", |
| 2358 | + "metadata": {}, |
| 2359 | + "source": [ |
| 2360 | + "### Visualize the weekly predictions" |
| 2361 | + ] |
| 2362 | + }, |
2343 | 2363 | {
|
2344 | 2364 | "cell_type": "code",
|
2345 | 2365 | "execution_count": 37,
|
|
2802 | 2822 | "metadata": {},
|
2803 | 2823 | "outputs": [],
|
2804 | 2824 | "source": [
|
2805 |
| - "predictions.to_csv('./datasets/air-quality-reports/aggregates/nyc_daily_predictions.csv')" |
| 2825 | + "predictions.to_csv('../predictions/nyc_daily_predictions.csv')" |
2806 | 2826 | ]
|
2807 | 2827 | },
|
2808 | 2828 | {
|
|
2812 | 2832 | "metadata": {},
|
2813 | 2833 | "outputs": [],
|
2814 | 2834 | "source": [
|
2815 |
| - "weekly_preds.to_csv('./datasets/air-quality-reports/aggregates/nyc_weekly_predictions.csv')" |
| 2835 | + "weekly_preds.to_csv('../predictions/nyc_weekly_predictions.csv')" |
2816 | 2836 | ]
|
2817 | 2837 | },
|
2818 | 2838 | {
|
|
3074 | 3094 | "metadata": {},
|
3075 | 3095 | "outputs": [],
|
3076 | 3096 | "source": [
|
3077 |
| - "weekly.to_csv('./datasets/air-quality-reports/aggregates/nyc_weekly_aqi.csv')" |
| 3097 | + "weekly.to_csv('../datasets/air-quality-reports/aggregates/NYC/nyc_weekly_aqi.csv')" |
3078 | 3098 | ]
|
3079 | 3099 | },
|
3080 | 3100 | {
|
|
0 commit comments