|
15 | 15 | "* [Introduction](#1) \n",
|
16 | 16 | "* [Imports](#2)\n",
|
17 | 17 | "* [Connecting to ArcGIS](#3)\n",
|
18 |
| - "* [Accessing & Visualizing the datasets](#4) \n", |
| 18 | + "* [Accessing & visualizing datasets](#4) \n", |
19 | 19 | "* [One-step univariate forecasting](#5) \n",
|
20 |
| - "* [Multi-Step Multivariate Forecasting](#17)\n", |
21 |
| - "* [One-Step multivariate forecasting](#29) \n", |
| 20 | + "* [Multi-step multivariate forecasting](#17)\n", |
| 21 | + "* [One-step multivariate forecasting](#29) \n", |
22 | 22 | "* [Conclusion](#42)\n",
|
23 | 23 | "* [Data resources](#43)"
|
24 | 24 | ]
|
|
39 | 39 | "\n",
|
40 | 40 | "This process involves the use of advanced deep learning models to predict future electricity usage based on historical data. We'll explore three different methods of forecasting, each utilizing the following specialized timeseries backbones:\n",
|
41 | 41 | "\n",
|
42 |
| - " - One-Step Univariate Forecasting with Bidirectional LSTM\n", |
43 |
| - " - Multi-Step Multivariate Forecasting with InceptionTime\n", |
44 |
| - " - One-Step Multivariate Forecasting with Time Series Transformer" |
| 42 | + " - One-step univariate forecasting with Bidirectional LSTM\n", |
| 43 | + " - Multi-step multivariate forecasting with InceptionTime\n", |
| 44 | + " - One-step multivariate forecasting with Time Series Transformer" |
45 | 45 | ]
|
46 | 46 | },
|
47 | 47 | {
|
|
102 | 102 | "cell_type": "markdown",
|
103 | 103 | "metadata": {},
|
104 | 104 | "source": [
|
105 |
| - "## Accessing & Visualizing datasets <a class=\"anchor\" id=\"4\"></a> " |
| 105 | + "## Accessing & visualizing datasets <a class=\"anchor\" id=\"4\"></a> " |
106 | 106 | ]
|
107 | 107 | },
|
108 | 108 | {
|
|
383 | 383 | "cell_type": "markdown",
|
384 | 384 | "metadata": {},
|
385 | 385 | "source": [
|
386 |
| - "### Data Preparation<a class=\"anchor\" id=\"6\"></a> \n", |
387 |
| - "Data preparation for a timeseries consists of first splitting the dataset into a training dataset and a testing dataset as follows:" |
| 386 | + "### Data processing<a class=\"anchor\" id=\"6\"></a> \n", |
| 387 | + "Data processing for a timeseries consists of first splitting the dataset into a training dataset and a testing dataset as follows:" |
388 | 388 | ]
|
389 | 389 | },
|
390 | 390 | {
|
|
573 | 573 | "cell_type": "markdown",
|
574 | 574 | "metadata": {},
|
575 | 575 | "source": [
|
576 |
| - "### Autocorrelation Plot <a class=\"anchor\" id=\"8a\"></a> " |
| 576 | + "### Autocorrelation plot <a class=\"anchor\" id=\"8a\"></a> " |
577 | 577 | ]
|
578 | 578 | },
|
579 | 579 | {
|
|
618 | 618 | "cell_type": "markdown",
|
619 | 619 | "metadata": {},
|
620 | 620 | "source": [
|
621 |
| - "### Model Building <a class=\"anchor\" id=\"8\"></a> " |
| 621 | + "### Model building <a class=\"anchor\" id=\"8\"></a> " |
622 | 622 | ]
|
623 | 623 | },
|
624 | 624 | {
|
|
632 | 632 | "cell_type": "markdown",
|
633 | 633 | "metadata": {},
|
634 | 634 | "source": [
|
635 |
| - "#### Data Preprocessing <a class=\"anchor\" id=\"9\"></a> " |
| 635 | + "#### Data preparation <a class=\"anchor\" id=\"9\"></a> " |
636 | 636 | ]
|
637 | 637 | },
|
638 | 638 | {
|
|
641 | 641 | "source": [
|
642 | 642 | "In this method, we are using a single variable named Total Power Consumption to forecast the 144 timesteps of future total power consumption or electricity usage for every 10 minutes based on its historical data, without using any explanatory variables.\n",
|
643 | 643 | "\n",
|
644 |
| - "The pre-processing of the data is carried out by the `prepare_tabulardata` method from the `arcgis.learn` module in the ArcGIS API for Python. This function will take either a non spatial dataframe, a feature layer or a spatial dataframe containing the dataset as input and will return a TabularDataObject that can be fed into the model. Here we are using a non spatial dataframe. \n", |
| 644 | + "The preparation of the data is carried out by the `prepare_tabulardata` method from the `arcgis.learn` module in the ArcGIS API for Python. This function will take either a non spatial dataframe, a feature layer or a spatial dataframe containing the dataset as input and will return a TabularDataObject that can be fed into the model. Here we are using a non spatial dataframe. \n", |
645 | 645 | "\n",
|
646 | 646 | "The primary input parameters required for the tool are:\n",
|
647 | 647 | "\n",
|
|
814 | 814 | "cell_type": "markdown",
|
815 | 815 | "metadata": {},
|
816 | 816 | "source": [
|
817 |
| - "#### Model Initialization <a class=\"anchor\" id=\"10\"></a>" |
| 817 | + "#### Model initialization <a class=\"anchor\" id=\"10\"></a>" |
818 | 818 | ]
|
819 | 819 | },
|
820 | 820 | {
|
|
847 | 847 | "cell_type": "markdown",
|
848 | 848 | "metadata": {},
|
849 | 849 | "source": [
|
850 |
| - "#### Learning Rate Search <a class=\"anchor\" id=\"11\"></a>" |
| 850 | + "#### Learning rate search <a class=\"anchor\" id=\"11\"></a>" |
851 | 851 | ]
|
852 | 852 | },
|
853 | 853 | {
|
|
886 | 886 | "cell_type": "markdown",
|
887 | 887 | "metadata": {},
|
888 | 888 | "source": [
|
889 |
| - "### Model Training <a class=\"anchor\" id=\"12\"></a>" |
| 889 | + "### Model training <a class=\"anchor\" id=\"12\"></a>" |
890 | 890 | ]
|
891 | 891 | },
|
892 | 892 | {
|
|
994 | 994 | "cell_type": "markdown",
|
995 | 995 | "metadata": {},
|
996 | 996 | "source": [
|
997 |
| - "### Power Consumption Forecast & Validation <a class=\"anchor\" id=\"13\"></a>" |
| 997 | + "### Power consumption forecast & validation <a class=\"anchor\" id=\"13\"></a>\n", |
| 998 | + "\n", |
| 999 | + "Now to ensure the model's effectiveness, first the trained model is utilized to forecast power consumption, followed by validation against the actual power consumption data." |
998 | 1000 | ]
|
999 | 1001 | },
|
1000 | 1002 | {
|
1001 | 1003 | "cell_type": "markdown",
|
1002 | 1004 | "metadata": {},
|
1003 | 1005 | "source": [
|
1004 |
| - "#### Forecasting Using the trained Timeseries Model <a class=\"anchor\" id=\"14\"></a>" |
| 1006 | + "#### Forecasting using the trained timeseries model <a class=\"anchor\" id=\"14\"></a>" |
1005 | 1007 | ]
|
1006 | 1008 | },
|
1007 | 1009 | {
|
|
1138 | 1140 | "cell_type": "markdown",
|
1139 | 1141 | "metadata": {},
|
1140 | 1142 | "source": [
|
1141 |
| - "#### Estimate model metrics for validation <a class=\"anchor\" id=\"15\"></a>" |
| 1143 | + "#### Estimate model metric for actual vs. forecast validation <a class=\"anchor\" id=\"15\"></a>" |
1142 | 1144 | ]
|
1143 | 1145 | },
|
1144 | 1146 | {
|
|
1295 | 1297 | "cell_type": "markdown",
|
1296 | 1298 | "metadata": {},
|
1297 | 1299 | "source": [
|
1298 |
| - "### Result Visualization <a class=\"anchor\" id=\"16\"></a>" |
| 1300 | + "#### Actual vs. forecast visualization <a class=\"anchor\" id=\"16\"></a>" |
1299 | 1301 | ]
|
1300 | 1302 | },
|
1301 | 1303 | {
|
|
1425 | 1427 | "cell_type": "markdown",
|
1426 | 1428 | "metadata": {},
|
1427 | 1429 | "source": [
|
1428 |
| - "## Multi-Step Multivariate Forecasting <a class=\"anchor\" id=\"17\"></a>" |
| 1430 | + "## Multi-step multivariate forecasting <a class=\"anchor\" id=\"17\"></a>" |
1429 | 1431 | ]
|
1430 | 1432 | },
|
1431 | 1433 | {
|
|
1446 | 1448 | "cell_type": "markdown",
|
1447 | 1449 | "metadata": {},
|
1448 | 1450 | "source": [
|
1449 |
| - "### Data Preparation <a class=\"anchor\" id=\"18\"></a> \n", |
1450 |
| - "Data preparation for timeseries consists of first splitting the dataset into a training dataset and a testing dataset as follows:" |
| 1451 | + "### Data processing <a class=\"anchor\" id=\"18\"></a> \n", |
| 1452 | + "Data processing for timeseries consists of first splitting the dataset into a training dataset and a testing dataset as follows:" |
1451 | 1453 | ]
|
1452 | 1454 | },
|
1453 | 1455 | {
|
|
1740 | 1742 | "cell_type": "markdown",
|
1741 | 1743 | "metadata": {},
|
1742 | 1744 | "source": [
|
1743 |
| - "### Model Building <a class=\"anchor\" id=\"20\"></a>" |
| 1745 | + "### Model building <a class=\"anchor\" id=\"20\"></a>" |
1744 | 1746 | ]
|
1745 | 1747 | },
|
1746 | 1748 | {
|
|
1754 | 1756 | "cell_type": "markdown",
|
1755 | 1757 | "metadata": {},
|
1756 | 1758 | "source": [
|
1757 |
| - "#### Data Preprocessing <a class=\"anchor\" id=\"21\"></a>" |
| 1759 | + "#### Data Preparation <a class=\"anchor\" id=\"21\"></a>" |
1758 | 1760 | ]
|
1759 | 1761 | },
|
1760 | 1762 | {
|
|
1992 | 1994 | "cell_type": "markdown",
|
1993 | 1995 | "metadata": {},
|
1994 | 1996 | "source": [
|
1995 |
| - "#### Multi-step Model Initialization <a class=\"anchor\" id=\"22\"></a>" |
| 1997 | + "#### Multi-step model initialization <a class=\"anchor\" id=\"22\"></a>" |
1996 | 1998 | ]
|
1997 | 1999 | },
|
1998 | 2000 | {
|
|
2016 | 2018 | "cell_type": "markdown",
|
2017 | 2019 | "metadata": {},
|
2018 | 2020 | "source": [
|
2019 |
| - "#### Learning Rate Search <a class=\"anchor\" id=\"23\"></a>" |
| 2021 | + "#### Learning rate search <a class=\"anchor\" id=\"23\"></a>" |
2020 | 2022 | ]
|
2021 | 2023 | },
|
2022 | 2024 | {
|
|
2055 | 2057 | "cell_type": "markdown",
|
2056 | 2058 | "metadata": {},
|
2057 | 2059 | "source": [
|
2058 |
| - "### Model Training <a class=\"anchor\" id=\"24\"></a>" |
| 2060 | + "### Model training <a class=\"anchor\" id=\"24\"></a>" |
2059 | 2061 | ]
|
2060 | 2062 | },
|
2061 | 2063 | {
|
|
2162 | 2164 | "cell_type": "markdown",
|
2163 | 2165 | "metadata": {},
|
2164 | 2166 | "source": [
|
2165 |
| - "### Power Consumption Forecast & Validation <a class=\"anchor\" id=\"25\"></a>" |
| 2167 | + "### Power consumption forecast & validation ¶ <a class=\"anchor\" id=\"25\"></a>\n", |
| 2168 | + "Now as earlier, to ensure the model's effectiveness, first the trained model is utilized to forecast power consumption, followed by validation against the actual power consumption data." |
2166 | 2169 | ]
|
2167 | 2170 | },
|
2168 | 2171 | {
|
2169 | 2172 | "cell_type": "markdown",
|
2170 | 2173 | "metadata": {},
|
2171 | 2174 | "source": [
|
2172 |
| - "#### Forecasting Using the trained Timeseries Model <a class=\"anchor\" id=\"26\"></a>" |
| 2175 | + "#### Forecasting using the trained timeseries model <a class=\"anchor\" id=\"26\"></a>" |
2173 | 2176 | ]
|
2174 | 2177 | },
|
2175 | 2178 | {
|
|
2598 | 2601 | "cell_type": "markdown",
|
2599 | 2602 | "metadata": {},
|
2600 | 2603 | "source": [
|
2601 |
| - "#### Estimate model metrics for validation <a class=\"anchor\" id=\"27\"></a>" |
| 2604 | + "#### Estimate model metric for actual vs. forecast validation <a class=\"anchor\" id=\"27\"></a>" |
2602 | 2605 | ]
|
2603 | 2606 | },
|
2604 | 2607 | {
|
|
2900 | 2903 | "cell_type": "markdown",
|
2901 | 2904 | "metadata": {},
|
2902 | 2905 | "source": [
|
2903 |
| - "## One- step multivariate Forecasting <a class=\"anchor\" id=\"29\"></a>\n", |
| 2906 | + "## One-step multivariate forecasting <a class=\"anchor\" id=\"29\"></a>\n", |
2904 | 2907 | "\n",
|
2905 | 2908 | "Finally, we will try one more method of multivariate forecasting but with one step instead of multistep, to see if this method performs better than the multi-step forecasting, while using multiple variables.\n",
|
2906 | 2909 | "\n",
|
|
2911 | 2914 | "cell_type": "markdown",
|
2912 | 2915 | "metadata": {},
|
2913 | 2916 | "source": [
|
2914 |
| - "### Data Preparation <a class=\"anchor\" id=\"30\"></a> \n", |
2915 |
| - "Data preparation for timeseries consists of first formatting the input dataframe to be used for forecasting using a One step Multivariate model, followed by splitting the dataset into training and testing datasets." |
| 2917 | + "### Data processing <a class=\"anchor\" id=\"30\"></a> \n", |
| 2918 | + "Data processing for timeseries consists of first formatting the input dataframe to be used for forecasting using a One step Multivariate model, followed by splitting the dataset into training and testing datasets." |
2916 | 2919 | ]
|
2917 | 2920 | },
|
2918 | 2921 | {
|
|
2926 | 2929 | "cell_type": "markdown",
|
2927 | 2930 | "metadata": {},
|
2928 | 2931 | "source": [
|
2929 |
| - "For the input dataframe to be used in forecasting, using the trained one-step multivariate forecasting model, it must be formatted appropriately. For this dataframe, we need to fill the to-be-forecasted variable with NaN values for the number of timesteps to be predicted. Additionally, the corresponding multivariate data for those future timesteps should be present for forecasting." |
| 2932 | + "While forecasting using the trained one-step multivariate forecasting model the input dataframe must be formatted appropriately. For this dataframe, we need to fill the to-be-forecasted variable with NaN values for the number of timesteps to be predicted. Additionally, the corresponding multivariate data for those future timesteps should be present for forecasting." |
2930 | 2933 | ]
|
2931 | 2934 | },
|
2932 | 2935 | {
|
|
3225 | 3228 | "cell_type": "markdown",
|
3226 | 3229 | "metadata": {},
|
3227 | 3230 | "source": [
|
3228 |
| - "### Model Building <a class=\"anchor\" id=\"33\"></a>" |
| 3231 | + "### Model building <a class=\"anchor\" id=\"33\"></a>" |
3229 | 3232 | ]
|
3230 | 3233 | },
|
3231 | 3234 | {
|
|
3239 | 3242 | "cell_type": "markdown",
|
3240 | 3243 | "metadata": {},
|
3241 | 3244 | "source": [
|
3242 |
| - "#### Data Preprocessing <a class=\"anchor\" id=\"34\"></a>" |
| 3245 | + "#### Data Preparation <a class=\"anchor\" id=\"34\"></a>" |
3243 | 3246 | ]
|
3244 | 3247 | },
|
3245 | 3248 | {
|
|
3480 | 3483 | "cell_type": "markdown",
|
3481 | 3484 | "metadata": {},
|
3482 | 3485 | "source": [
|
3483 |
| - "#### Learning Rate Search <a class=\"anchor\" id=\"36\"></a>" |
| 3486 | + "#### Learning rate search <a class=\"anchor\" id=\"36\"></a>" |
3484 | 3487 | ]
|
3485 | 3488 | },
|
3486 | 3489 | {
|
|
3519 | 3522 | "cell_type": "markdown",
|
3520 | 3523 | "metadata": {},
|
3521 | 3524 | "source": [
|
3522 |
| - "### Model Training <a class=\"anchor\" id=\"37\"></a>" |
| 3525 | + "### Model training <a class=\"anchor\" id=\"37\"></a>" |
3523 | 3526 | ]
|
3524 | 3527 | },
|
3525 | 3528 | {
|
|
3626 | 3629 | "cell_type": "markdown",
|
3627 | 3630 | "metadata": {},
|
3628 | 3631 | "source": [
|
3629 |
| - "### Power Consumption Forecast & Validation <a class=\"anchor\" id=\"38\"></a>" |
| 3632 | + "### Power consumption forecast & validation <a class=\"anchor\" id=\"38\"></a>\n", |
| 3633 | + "As earlier to ensure the model's effectiveness, first the trained model is utilized to forecast power consumption, followed by validation against the actual power consumption data." |
3630 | 3634 | ]
|
3631 | 3635 | },
|
3632 | 3636 | {
|
3633 | 3637 | "cell_type": "markdown",
|
3634 | 3638 | "metadata": {},
|
3635 | 3639 | "source": [
|
3636 |
| - "#### Forecasting Using the trained Timeseries Model <a class=\"anchor\" id=\"39\"></a>" |
| 3640 | + "#### Forecasting using the trained timeseries model <a class=\"anchor\" id=\"39\"></a>" |
3637 | 3641 | ]
|
3638 | 3642 | },
|
3639 | 3643 | {
|
|
3884 | 3888 | "cell_type": "markdown",
|
3885 | 3889 | "metadata": {},
|
3886 | 3890 | "source": [
|
3887 |
| - "#### Estimate model metrics for validation <a class=\"anchor\" id=\"40\"></a>" |
| 3891 | + "#### Estimate model metric for actual vs. forecast validation <a class=\"anchor\" id=\"40\"></a>" |
3888 | 3892 | ]
|
3889 | 3893 | },
|
3890 | 3894 | {
|
|
3992 | 3996 | "cell_type": "markdown",
|
3993 | 3997 | "metadata": {},
|
3994 | 3998 | "source": [
|
3995 |
| - "### Result Visualization <a class=\"anchor\" id=\"41\"></a>" |
| 3999 | + "#### Actual vs. forecast visualization <a class=\"anchor\" id=\"41\"></a>" |
3996 | 4000 | ]
|
3997 | 4001 | },
|
3998 | 4002 | {
|
|
0 commit comments