You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ML-For-Beginners/7-TimeSeries/1-Introduction/solution/notebook.ipynb

159 lines
397 KiB

4 years ago
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data Setup\n",
"\n",
"In this notebook, we demonstrate how to:\n",
"- setup time series data for this module\n",
"- visualize the data\n",
"\n",
"The data in this example is taken from the GEFCom2014 forecasting competition<sup>1</sup>. It consists of 3 years of hourly electricity load and temperature values between 2012 and 2014. \n",
"\n",
"<sup>1</sup>Tao Hong, Pierre Pinson, Shu Fan, Hamidreza Zareipour, Alberto Troccoli and Rob J. Hyndman, \"Probabilistic energy forecasting: Global Energy Forecasting Competition 2014 and beyond\", International Journal of Forecasting, vol.32, no.3, pp 896-913, July-September, 2016."
]
},
{
"cell_type": "code",
"execution_count": 6,
4 years ago
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import matplotlib.pyplot as plt\n",
"from common.utils import load_data\n",
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Load the data from csv into a Pandas dataframe"
]
},
{
"cell_type": "code",
"execution_count": 7,
4 years ago
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" load\n",
"2012-01-01 00:00:00 2698.0\n",
"2012-01-01 01:00:00 2558.0\n",
"2012-01-01 02:00:00 2444.0\n",
"2012-01-01 03:00:00 2402.0\n",
"2012-01-01 04:00:00 2403.0"
],
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>load</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>2012-01-01 00:00:00</th>\n <td>2698.0</td>\n </tr>\n <tr>\n <th>2012-01-01 01:00:00</th>\n <td>2558.0</td>\n </tr>\n <tr>\n <th>2012-01-01 02:00:00</th>\n <td>2444.0</td>\n </tr>\n <tr>\n <th>2012-01-01 03:00:00</th>\n <td>2402.0</td>\n </tr>\n <tr>\n <th>2012-01-01 04:00:00</th>\n <td>2403.0</td>\n </tr>\n </tbody>\n</table>\n</div>"
},
"metadata": {},
"execution_count": 7
4 years ago
}
],
"source": [
"data_dir = './data'\n",
4 years ago
"energy = load_data(data_dir)[['load']]\n",
"energy.head()\n"
4 years ago
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot all available load data (January 2012 to Dec 2014)"
]
},
{
"cell_type": "code",
"execution_count": 8,
4 years ago
"metadata": {},
"outputs": [
{
"output_type": "display_data",
4 years ago
"data": {
"text/plain": "<Figure size 1080x576 with 1 Axes>",
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"465.658661pt\" version=\"1.1\" viewBox=\"0 0 904.55375 465.658661\" width=\"904.55375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;white-space:pre;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 465.658661 \nL 904.55375 465.658661 \nL 904.55375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 60.35375 398.88 \nL 897.35375 398.88 \nL 897.35375 7.2 \nL 60.35375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m409c2e72f7\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"60.35375\" xlink:href=\"#m409c2e72f7\" y=\"398.88\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- Jan -->\n <defs>\n <path d=\"M 9.8125 72.90625 \nL 19.671875 72.90625 \nL 19.671875 5.078125 \nQ 19.671875 -8.109375 14.671875 -14.0625 \nQ 9.671875 -20.015625 -1.421875 -20.015625 \nL -5.171875 -20.015625 \nL -5.171875 -11.71875 \nL -2.09375 -11.71875 \nQ 4.4375 -11.71875 7.125 -8.046875 \nQ 9.8125 -4.390625 9.8125 5.078125 \nz\n\" id=\"DejaVuSans-74\"/>\n <path d=\"M 34.28125 27.484375 \nQ 23.390625 27.484375 19.1875 25 \nQ 14.984375 22.515625 14.984375 16.5 \nQ 14.984375 11.71875 18.140625 8.90625 \nQ 21.296875 6.109375 26.703125 6.109375 \nQ 34.1875 6.109375 38.703125 11.40625 \nQ 43.21875 16.703125 43.21875 25.484375 \nL 43.21875 27.484375 \nz\nM 52.203125 31.203125 \nL 52.203125 0 \nL 43.21875 0 \nL 43.21875 8.296875 \nQ 40.140625 3.328125 35.546875 0.953125 \nQ 30.953125 -1.421875 24.3125 -1.421875 \nQ 15.921875 -1.421875 10.953125 3.296875 \nQ 6 8.015625 6 15.921875 \nQ 6 25.140625 12.171875 29.828125 \nQ 18.359375 34.515625 30.609375 34.515625 \nL 43.21875 34.515625 \nL 43.21875 35.40625 \nQ 43.21875 41.609375 39.140625 45 \nQ 35.0625 48.390625 27.6875 48.390625 \nQ 23 48.390625 18.546875 47.265625 \nQ 14.109375 46.140625 10.015625 43.890625 \nL 10.015625 52.203125 \nQ 14.9375 54.109375 19.578125 55.046875 \nQ 24.21875 56 28.609375 56 \nQ 40.484375 56 46.34375 49.84375 \nQ 52.203125 43.703125 52.203125 31.203125 \nz\n\" id=\"DejaVuSans-97\"/>\n <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-110\"/>\n </defs>\n <g transform=\"translate(36.366863 423.025903)rotate(-30)scale(0.12 -0.12)\">\n <use xlink:href=\"#DejaVuSans-74\"/>\n <use x=\"29.492188\" xlink:href=\"#DejaVuSans-97\"/>\n <use x=\"90.771484\" xlink:href=\"#DejaVuSans-110\"/>\n </g>\n <!-- 2012 -->\n <defs>\n <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA4kAAAHVCAYAAABc/b7wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90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AON/dG3Q1CSJlT1dKn3G5rW6Q3KiGEkAigkkhSzRfuXY2L7+EKPyEkWkyrWtC3lBBCSARQSSSppusEa04RQqLDS94alkkkhKiYvaUu6i6QMoJKIiGEEBJX6G5KCHHI0xtqi7b1DY7gnN/Ox5I9jRH0iCQZKomEEEJIxEgzv1JaDcuSgeEMJk+Zjxe3H426K6SMyCrkxZHWPkgJ3LfsUOk7RBINlURCANwwb0/UXSCEpBCRNxXShTRdtPQMAgDuXHwg4p6QciKTzUbdBVJGUEkkqUXqZmVPrKuJriOEEOIKapSEkGIyKlNiHkoN4hYqiSS1PFdRH3UXCCGEEEICwUpJZHgzccuEqDtASFRsPtIRSDs76jtx6sn8lAgh7tGym9LdNF14yWpLiB0ZChISIJzZktRimijCJd94cF0g7RBCCEkXkpN6UiL4phG30N2UpBaOzYSQ2EOLU1kiaEokISAUAmOc0JJjjU167l5yAJOnzC9Zv0gyoZJIUkspVnAzWYnrX96Dho5+5f7VB1tC7wMhJL7YqgoKMRXnBa7m7gFMnjIf2+qCcecvd2L8KEkCUa09jMvP9LM6wXH/q4dL1COSZKgkktRSisF5W10Hnlxfg1/N3qnc/6O
4 years ago
},
"metadata": {
"needs_background": "light"
}
4 years ago
}
],
"source": [
"energy.plot(y='load', subplots=True, figsize=(15, 8), fontsize=12)\n",
"plt.xlabel('timestamp', fontsize=12)\n",
"plt.ylabel('load', fontsize=12)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot first week of July 2014"
]
},
{
"cell_type": "code",
"execution_count": 9,
4 years ago
"metadata": {},
"outputs": [
{
"output_type": "display_data",
4 years ago
"data": {
"text/plain": "<Figure size 1080x576 with 1 Axes>",
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"477.295769pt\" version=\"1.1\" viewBox=\"0 0 904.55375 477.295769\" width=\"904.55375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;white-space:pre;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 477.295769 \nL 904.55375 477.295769 \nL 904.55375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 60.35375 398.88 \nL 897.35375 398.88 \nL 897.35375 7.2 \nL 60.35375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"me07e2e9870\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"60.35375\" xlink:href=\"#me07e2e9870\" y=\"398.88\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 01 -->\n <defs>\n <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n </defs>\n <g transform=\"translate(32.444355 421.411528)rotate(-30)scale(0.12 -0.12)\">\n <use xlink:href=\"#DejaVuSans-48\"/>\n <use x=\"63.623047\" xlink:href=\"#DejaVuSans-49\"/>\n </g>\n <!-- Jul -->\n <defs>\n <path d=\"M 9.8125 72.90625 \nL 19.671875 72.90625 \nL 19.671875 5.078125 \nQ 19.671875 -8.109375 14.671875 -14.0625 \nQ 9.671875 -20.015625 -1.421875 -20.015625 \nL -5.171875 -20.015625 \nL -5.171875 -11.71875 \nL -2.09375 -11.71875 \nQ 4.4375 -11.71875 7.125 -8.046875 \nQ 9.8125 -4.390625 9.8125 5.078125 \nz\n\" id=\"DejaVuSans-74\"/>\n <path d=\"M 8.5 21.578125 \nL 8.5 54.6875 \nL 17.484375 54.6875 \nL 17.484375 21.921875 \nQ 17.484375 14.15625 20.5 10.265625 \nQ 23.53125 6.390625 29.59375 6.390625 \nQ 36.859375 6.390625 41.078125 11.03125 \nQ 45.3125 15.671875 45.3125 23.6875 \nL 45.3125 54.6875 \nL 54.296875 54.6875 \nL 54.296875 0 \nL 45.3125 0 \nL 45.3125 8.40625 \nQ 42.046875 3.421875 37.71875 1 \nQ 33.40625 -1.421875 27.6875 -1.421875 \nQ 18.265625 -1.421875 13.375 4.4375 \nQ 8.5 10.296875 8.5 21.578125 \nz\nM 31.109375 56 \nz\n\" id=\"DejaVuSans-117\"/>\n <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n </defs>\n <g transform=\"translate(39.848285 432.653011)rotate(-30)scale(0.12 -0.12)\">\n <use xlink:href=\"#DejaVuSans-74\"/>\n <use x=\"29.492188\" xlink:href=\"#DejaVuSans-117\"/>\n <use x=\"92.871094\" xlink:href=\"#DejaVuSans-108\"/>\n </g>\n <!-- 2014 -->\n <defs>\n <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.812
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA4kAAAHiCAYAAABFgonlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOzdeXhb5ZU/8O+r3bYkO7bl3YljZ3dCnJBASCCQFkqBgUDpBrRMZ6YLMJ2l26/TTjtDmelMp09nOtNOaUt31tKFtRToQAkpSUhIiJPY2Z14X+VFkiVL1vL+/pBkjHESL5Ku7r3fz/P4IbF07z1Gsa1z3/OeI6SUICIiIiIiIgIAg9IBEBERERERUfZgkkhEREREREQTmCQSERERERHRBCaJRERERERENIFJIhEREREREU1gkkhEREREREQTTEoHoITi4mJZU1OjdBhERERERESKOHDggFtK6ZruMV0miTU1Ndi/f7/SYRARERERESlCCNF2rsdYbkpEREREREQTmCQSERERERHRBCaJRERERERENEGXexKJiIiIiIgAIBwOo7OzE8FgUOlQ0sJms6Gqqgpms3nGxzBJJCIiIiIi3ers7ITD4UBNTQ2EEEqHk1JSSgwODqKzsxOLFy+e8XEsNyUiIiIiIt0KBoMoKirSXIIIAEIIFBUVzXqVlEkiERERERHpmhYTxKS5fG1MEomIiIiIiBRkt9tTcp57770X3/rWt+Z9HiaJRERERERENIFJIhERERERURaQUuILX/g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ZMEolUJBqTeHRvOzbXFaHOZZ/XuW5uqIQvGMGOEwMpio6IiIiItIBJIpGK7DjRj66RsTk1rJlqc10RFuSa8YejvSmIjIiIiIi0gkkikYo8/HobShxWXLOqdN7nMhkN2LykGLtPD0JKdjklIiIiojgmiUQqMRIYx46TA/jghmqYjan51t1SV4xebxBn3P6UnI+IiIiI1I9JIpFK7GkZhJTAthWulJ1zy5IiAMDu0+6UnZOIiIiI1I1JIpFK7GpxI89ixEVVBSk758LCXFQW5OA1JolERERElMAkkUgldp8exCWLC1NWagoAQghsWVKEPS2DiMa4L5GIiIiImCQSqUKPZwxn3H5sWVKc8nNvWVIMbzCC5m5Pys9NREREROrDJJFIBXafHgQAbK5LfZKYPOeuxDWIiIiISN+YJBKpwK4WNwrzLFhR5kj5uV0OK5aXOrC7hfsSiYiIiIhJIlHWk1Ji9+lBXFZbBINBpOUam5cUYd/ZIQTD0bScn4iIiIjUg0kizUgwHMWxHi9+d7gbD+xswcvH+uAeDSkdli6ccfvR6w1ic2JcRTpsqStGKBLDm+3DabsGEREREamDSekAKDtJKfHKiX48tq8DJ/t86BgKYLrml1ULcrC2ugAbFy3AbZcuhNVkzHywGre7Jb5XcEsa9iMmXVpbCKNBYPfpwbTseyQiIiIi9WCSSG8TjUk8d6QH979yGsd7fShz2nDxogXY3lCJJSV2LHHZUZ5vw6n+URzqGEFjxwga20fw3OEetA4GcO9N9Up/CZqz+7QbFfk2LCrKTds1HDYz1lblY1eLG5/H8rRdh4iIiIiyH5NEAhBPDn9zoAPf39GC1sEA6lx5+M8PrMVNDRXTzuW7ZHEhLllcOPH3e59pxs93t+JdK0qwdZkrk6FrWiwmsefMIK5eWQoh0rMfMWnLkmLcv6MF3mAYTps5rdciIiIiouzFPYmEPm8QH/nxXnzxt0fgsJnxg4+sx/995krcenHVjAe3/8N1K7CkxI7P//oQhv3jaY5YP472eDESCGNLGvcjJm2uK0Y0JrH3zFDar0VERERE2YtJos69enIA1//
4 years ago
},
"metadata": {
"needs_background": "light"
}
4 years ago
}
],
"source": [
"energy['2014-07-01':'2014-07-07'].plot(y='load', subplots=True, figsize=(15, 8), fontsize=12)\n",
"plt.xlabel('timestamp', fontsize=12)\n",
"plt.ylabel('load', fontsize=12)\n",
"plt.show()"
]
}
],
"metadata": {
"kernel_info": {
"name": "python3"
},
"kernelspec": {
"name": "python37364bit8d3b438fb5fc4430a93ac2cb74d693a7",
"display_name": "Python 3.7.0 64-bit ('3.7')"
4 years ago
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
4 years ago
},
"nteract": {
"version": "nteract-front-end@1.0.0"
},
"metadata": {
"interpreter": {
"hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d"
}
4 years ago
}
},
"nbformat": 4,
"nbformat_minor": 2
}