Project Aim
: The aim is to forecast the Fremont Bridge Bicycle ridership for next two years using facebook's prophet library.
The Fremont Bridge Bicycle Count dataset includes bycycle count from October 2012 to 2019. It consist of count records (number of bikes that cross the bridge using the pedestrian/bicycle pathways). Inductive loops on the east and west pathways count the passing of bicycles regardless of travel direction.
- This notebook consist of forecasting codes
- Forecasting is done using Meta's prophet library.
- Here I have forecasted the Bicycle counts for next 2 years.
- Included holidays (Washinton) to observe the impact on daily counts.
- Performed a forward-chaining cross-validation.
- Importing important libraries
- Reading and loading data from kaggle: Data Source
- EDA: Performing exploratory analysis
- Converted (resamples) data to daily and weekly count to check the pattern and inconsistencies
Here is a plot for daily ridership count:
- Next, added holidays to check the impact of holidays on count forecast
- Holidays associated with Washinton states has been utilised
- Trained the model using prophet library
- Set the seassionality mode to
multiplicative
- Set a yearly seassionality to 4
- Added the holidays
- Set the seassionality mode to
- Generated the forecast plot using matplotlib and plotly (interactive plot)
- Saved the model to json file using pickle library
- Generated a components plot using matplotlib and plotly (interactive plot)
- The component plot showed that the bicycle ridership
tread is upward
since 2017 and still increasing. - The
yearly trend
showed thatJune to August
(summer) the bicycleridership grows by 40%
, while itdrops
by20%-40%
duringJanuary to March
(winder season). Weekly ridership
trend revealed thatMonday to Friday
the ridershipincreases by 20%
while duringweekend
itdrops
by40%
.
- The component plot showed that the bicycle ridership
- Performed model evaluation using a forward chaining cross-validation with
- horizon = '90 days'
- period = '30 days',
- initial = '730 days'
- parallel = 'processes' (enabled parellel processing)
- Generated a cross-validation metric plot
- Used
rmse
as evaluation metric and selected arolling_window
of 0.1 (10%)
- Used