Skip to content

Commit

Permalink
Update gcn-lstm-time-series.ipynb (#1833)
Browse files Browse the repository at this point in the history
typos
  • Loading branch information
andife committed Jan 21, 2021
1 parent 70f2611 commit 2bfc669
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demos/time-series/gcn-lstm-time-series.ipynb
Expand Up @@ -28,7 +28,7 @@
"source": [
"The dynamics of many real-world phenomena are spatio-temporal in nature. Traffic forecasting is a quintessential example of spatio-temporal problems for which we present here a deep learning framework that models speed prediction using spatio-temporal data. The task is challenging due to two main inter-linked factors: (1) the complex spatial dependency on road networks, and (2) non-linear temporal dynamics with changing road conditions.\n",
"\n",
"To address these challenges, here we explore a neural network architecture that learns from both the spatial road network data and time-series of historical speed changes to forecast speeds on road segments at a future time. In the following we demo how to forecast speeds on road segments through a `graph convolution` and `LSTM` hybrid model. The spatial dependency of the road networks are learnt through multiple graph convolution layers stacked over multiple LSTM, sequence to sequence model, layers that leverage the historical speeds on top of the network structure to predicts speeds in the future for each entity. \n",
"To address these challenges, here we explore a neural network architecture that learns from both the spatial road network data and time-series of historical speed changes to forecast speeds on road segments at a future time. In the following we demo how to forecast speeds on road segments through a `graph convolution` and `LSTM` hybrid model. The spatial dependency of the road networks are learnt through multiple graph convolution layers stacked over multiple LSTM, sequence to sequence model, layers that leverage the historical speeds on top of the network structure to predict speeds in the future for each entity. \n",
"\n",
"The architecture of the GCN-LSTM model is inspired by the paper: [T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction](https://ieeexplore.ieee.org/document/8809901).\n",
"\n",
Expand Down Expand Up @@ -201,14 +201,14 @@
"output_type": "stream",
"text": [
"No. of sensors: 207 \n",
"No of timesteps: 2016\n"
"No. of timesteps: 2016\n"
]
}
],
"source": [
"speed_data, sensor_dist_adj = dataset.load()\n",
"num_nodes, time_len = speed_data.shape\n",
"print(\"No. of sensors:\", num_nodes, \"\\nNo of timesteps:\", time_len)"
"print(\"No. of sensors:\", num_nodes, \"\\nNo. of timesteps:\", time_len)"
]
},
{
Expand Down Expand Up @@ -448,7 +448,7 @@
"source": [
"### Train/test split\n",
"\n",
"Just like for modeling any standard supervised learning problem, we first split the data into mutually exclusive train and test sets. However, unlike, a standard supervised learning problem, in timeseries analysis, the data is in some chronological time respecting order and the train/test happens along the timeline. Lets say, we use the first `T_t` observations for training and the remaining `T - T_t` of the total `T` observations for testing. \n",
"Just like for modeling any standard supervised learning problem, we first split the data into mutually exclusive train and test sets. However, unlike, a standard supervised learning problem, in timeseries analysis, the data is in some chronological time respecting order and the train/test happens along the timeline. Let's say, we use the first `T_t` observations for training and the remaining `T - T_t` of the total `T` observations for testing. \n",
"\n",
"In the following we use first 80% observations for training and the rest for testing."
]
Expand Down

0 comments on commit 2bfc669

Please sign in to comment.