Predicting bike sharing demand patterns with a feed-forward neural network implemented in raw NumPy.
In this project, I built a simple feed-forward neural network to predict daily bike rental ridership, based on a public UCI Machine Learning dataset.\
\
Neural networks are extremely powerful in finding complex patterns in datasets. The feedforward neural network consists of a number of fully connected layers:
The layers in the neural network being fully connected means that every node in every hidden layer processes information from all nodes from the previous layer. In the first hidden layer, this means processing the input data; in subsequent hidden layers, this means processing, combining data from previous hidden layers. Then when this is all done, the network checks its accuracy against known samples and backpropagates prediction error, gradually changing the weighting between nodes in the network until ample accuracy is achieved. This is how a neural network can identify complex relationships in datasets.\
\
In this particular case, the dataset presented a quite complex time series with several, only partially cyclical fluctuations. I utilized only 1 hidden layer but with 20 nodes to capture the variability of demand. In the end, as can be seen in the notebook, the prediction is quite accurate for most of the time periods, with a slight weakness around the Festive Season. This is due to the fact that the training data didn’t include much information for previous Festive Seasons and as such, couldn’t train properly for this scenario.
This was a small experimental project, and as such, it contains 2 associated files:
Datasets can be found in the /Assets folder.
For more details, please see the two files above.
Just the usual basic tools: