diff --git a/notebooks/advanced/05 Timeseries Forecasting (multiple ids).ipynb b/notebooks/advanced/05 Timeseries Forecasting (multiple ids).ipynb index e35751ffc..56e94979e 100644 --- a/notebooks/advanced/05 Timeseries Forecasting (multiple ids).ipynb +++ b/notebooks/advanced/05 Timeseries Forecasting (multiple ids).ipynb @@ -181,7 +181,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Our `(AAPL, 2015-07-15 00:00:00)` is also in the data again:" + "Our `(AAPL, 2020-07-14 00:00:00)` is also in the data again:" ] }, { @@ -190,7 +190,7 @@ "metadata": {}, "outputs": [], "source": [ - "X.loc[\"AAPL\", pd.to_datetime('2015-07-15')]" + "X.loc[\"AAPL\", pd.to_datetime('2020-07-14')]" ] }, { @@ -242,7 +242,7 @@ "metadata": {}, "outputs": [], "source": [ - "y[\"AAPL\", pd.to_datetime(\"2015-07-15\")], df.loc[pd.to_datetime(\"2015-07-16\"), \"AAPL\"]" + "y[\"AAPL\", pd.to_datetime(\"2020-07-13\")], df.loc[pd.to_datetime(\"2020-07-14\"), \"AAPL\"]" ] }, { @@ -354,7 +354,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.2" + "version": "3.7.7" } }, "nbformat": 4, diff --git a/notebooks/examples/05 Timeseries Forecasting.ipynb b/notebooks/examples/05 Timeseries Forecasting.ipynb index 3d213cd44..37e21f687 100644 --- a/notebooks/examples/05 Timeseries Forecasting.ipynb +++ b/notebooks/examples/05 Timeseries Forecasting.ipynb @@ -159,7 +159,7 @@ "metadata": {}, "source": [ "The resulting dataframe now consists of these \"windows\" stamped out of the original dataframe.\n", - "For example all data with the `id = (AAPL, 2015-07-15 00:00:00)` comes from the original data of stock `AAPL` including the last 20 days until `2015-07-15`:" + "For example all data with the `id = (AAPL, 2020-07-14 00:00:00)` comes from the original data of stock `AAPL` including the last 20 days until `2020-07-14`:" ] }, { @@ -168,7 +168,7 @@ "metadata": {}, "outputs": [], "source": [ - "df_rolled[df_rolled[\"id\"] == (\"AAPL\", pd.to_datetime(\"2015-07-15\"))]" + "df_rolled[df_rolled[\"id\"] == (\"AAPL\", pd.to_datetime(\"2020-07-14\"))]" ] }, { @@ -177,8 +177,8 @@ "metadata": {}, "outputs": [], "source": [ - "df_melted[(df_melted[\"date\"] <= pd.to_datetime(\"2015-07-15\")) & \n", - " (df_melted[\"date\"] >= pd.to_datetime(\"2015-06-16\")) & \n", + "df_melted[(df_melted[\"date\"] <= pd.to_datetime(\"2020-07-14\")) & \n", + " (df_melted[\"date\"] >= pd.to_datetime(\"2020-06-15\")) & \n", " (df_melted[\"Symbols\"] == \"AAPL\")]" ] }, @@ -260,7 +260,7 @@ "The rolled (windowed) data sample is now in the correct format to use it for `tsfresh`s feature extraction.\n", "As normal, features will be extracted using all data for a given `id`, which is in our case all data of a given window and a given id (one colored box in the graph above).\n", "\n", - "If the feature extraction will return a row with the index `(AAPL, 2015-07-15 00:00:00)`, you now it has been calculated using the `AAPL` data up and including `2015-07-15` (and 20 days of history)." + "If the feature extraction will return a row with the index `(AAPL, 2020-07-14 00:00:00)`, you now it has been calculated using the `AAPL` data up and including `2020-07-14` (and 20 days of history)." ] }, { @@ -307,7 +307,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Our `(AAPL, 2015-07-15 00:00:00)` is also in the data again:" + "Our `(AAPL, 2020-07-14 00:00:00)` is also in the data again:" ] }, { @@ -316,7 +316,7 @@ "metadata": {}, "outputs": [], "source": [ - "X.loc['2015-07-15']" + "X.loc['2020-07-14']" ] }, { @@ -339,7 +339,7 @@ "source": [ "We can now use the extracted features to train a regressor.\n", "But what will be our targets?\n", - "The target for the row `2015-07-15` is the value on the next timestep (that would be `2015-07-16` in this case).\n", + "The target for the row `2020-07-13` is the value on the next timestep (that would be `2020-07-14` in this case).\n", "\n", "So all we need to do is go back to our original dataframe and take the stock value of tomorrow.\n", "This is done with `shift`:" @@ -367,14 +367,7 @@ "metadata": {}, "outputs": [], "source": [ - "y[\"2015-07-15\"], df[\"2015-07-16\"].iloc[0]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The target for `2015-07-15` is to forecast the value of the next day, `2015-07-16`." + "y[\"2020-07-13\"], df[\"2020-07-14\"].iloc[0]" ] }, { @@ -514,7 +507,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.2" + "version": "3.7.7" } }, "nbformat": 4,