1. Introduction
Over the past few decades, shared bikes have gained significant attention as a sustainable urban transportation option [
1]. Bike-sharing systems (BSS) offer a green alternative for short-distance travel, reducing carbon emissions and improving last-mile connectivity to public transit [
2]. Notably, during the COVID-19 pandemic, BSS emerged as a resilient mode, addressing concerns about overcrowding in public transit. The integration of BSS into intelligent urban traffic systems has several benefits [
3]. For instance, it enhances the efficiency of public transportation, reducing road traffic congestion [
4]. However, one significant challenge in BSS is the imbalanced distribution of bikes, affecting users’ riding experience. Research has shown that urban centers have a higher bike concentration than rural areas, and the demand for bikes experiences periodic peaks during work commute times [
5]. The demand patterns in BSS are influenced by both spatial and temporal dependencies. Spatial aspects involve the varying demand across different areas and the geographic distribution of bike stations. Temporal dependencies refer to fluctuations in demand throughout the day, week, or year. Understanding these dependencies is crucial for operators to identify high-demand areas and optimize resource allocation, such as redistributing bikes or expanding stations. To tackle the spatial and temporal disparities, methods for bike redistribution have been formulated. These approaches involve the utilization of trucks or trailers to reposition bicycles within the urban area [
6,
7]. To enhance service effectiveness and minimize the expenses associated with redistribution, researchers have harnessed historical bike usage information to precisely forecast upcoming demand [
8,
9]. The accurate prediction of bike demand is fundamental to effective redistribution and overall BSS performance.
The development of BSSs insists on the significant role played by technological advancements. Also, the success of these systems is dependent on the solution to three issues: (a) the number of stations and where they are located; (b) the capacity of the stations; and (c) the distribution of bikes. Estimating the demand placed on the system is necessary in order to find a solution to these issues. An in-depth analysis of bike-sharing research published between 2010 and 2018 reveals that demand estimation is one of the most swiftly developing trends in the field of bike-sharing research worldwide [
10]. Considering the significance of BSS in urban transportation, precise demand forecasting plays a vital role in ensuring efficient bike rebalancing during daily operations. Both traditional and machine learning methods have been the subject of numerous research efforts to develop frameworks that can accurately anticipate citywide bike demand. The precise prediction of bike demand enables operators to optimize bike allocation and resource management, leading to enhanced customer satisfaction and reduced operational expenses.
Time series modeling and regression analysis are two common approaches to bike demand forecasting. Time series models are used to model and forecast data that changes over time, such as hourly or daily bike demand. Time series models can capture patterns such as trends, seasonality, and cyclicality in the data and use them to make predictions. Regression analysis, on the other hand, is used to model the relationship between one or more predictor variables and a response variable. In the context of bike demand forecasting, regression analysis can be used to model the relationship between bike demand and various factors such as weather, time of day, day of the week, and holidays. Regression models can capture the effects of these factors on bike demand and use them to make predictions. Both time series modeling and regression analysis have their strengths and weaknesses, and the choice of approach depends on the specifics of the problem at hand. Time series models are useful when the focus is on forecasting future bike demand based on historical patterns, while regression analysis is useful when the focus is on understanding the factors that affect bike demand and how they can be leveraged to improve forecasting accuracy. In this work, we use both types of algorithms to predict the demand for bikes during the next day and next month.
The present research focuses on addressing the following questions:
The challenge involves utilizing historical bike usage data to accurately forecast the future bike demand within a BSS. This encompasses understanding the patterns, trends, and potential influencing factors that drive bike demand fluctuations over time and generalize the models.
- 2.
How can the integration of temporal factors, such as day of the week, time of day, and seasonality, improve the accuracy of bike demand predictions using time series and regression algorithms?
With a focus on harnessing temporal dynamics, such as day of the week, time of day, and seasonal influences, this article aims to uncover novel insights that optimize the predictive accuracy of time series and regression algorithms.
To address these questions, we use the dataset that represents a two-year historical log from the Capital Bikeshare system, Washington, DC, USA [
11]. To predict the demands for the bike, we propose to use regression models such as Random Forest and time series models such as ARIMA, SARIMA, LSTM, and GRU. In addition, we test the generalizability of the developed models using another dataset. This work not only seeks to advance the field of urban mobility and sustainable transportation but also promises practical implications for optimizing bike allocation, ensuring user satisfaction, facilitating more efficient urban planning strategies, and so on.
The main contributions of the proposed work include:
Conduct an exploratory analysis of trends, patterns, outliers, and unsettled points in bike prediction
Analyze the fine-grained temporal factors, such as the day of the week, time of day, and seasonality, which play a crucial role in shaping bike demand patterns in urban environments and utilize AI techniques to capture and leverage these patterns for better forecasting.
Develop AI-driven forecasting models tailored for bike demand prediction using time series and regression algorithms and evaluate their performance using MAE, RMSE, and MSE.
Validate the developed models against a new dataset: the London Bike Sharing System.
The rest of the article is orchestrated as follows:
Section 2 provides a comprehensive review of the existing works related to the BSS. In
Section 3, a description of the dataset and an exploratory data analysis are presented. A brief review of the time series and regression models used in the present work is also given in
Section 3. In
Section 4, we detail the experimental settings we used and the results of the developed models. A discussion on the performance of the proposed models is presented in
Section 5. Finally, we provide a conclusion and scope for further extension of our work in
Section 6.
2. Literature Review
Various empirical studies have employed diverse predictive models to forecast bike-sharing demand. These models typically incorporate historical data and multiple external factors, such as weather conditions, temporal details, and spatial information. A classification system for predicting BSS [
12] is introduced based on the specific data formats obtained from both docked and dockless BSS. In this section, we provide a comprehensive overview of different models utilized for predicting BSS.
In the study conducted by Sathishkumar et al. [
13], a predictive model for bike-sharing demand was developed using a machine learning approach. Data from a BSS in Bangalore, India, was used, and the most significant predictors of bike demand were found to be temperature and humidity. The effectiveness of a machine learning approach for predicting bike-sharing demand was demonstrated, and the importance of considering external factors such as weather and holidays was highlighted. The findings can inform decision-making for bike-sharing operators, urban planners, and policymakers to develop more effective and sustainable transportation systems. In the study by Brownlee et al. [
14], the authors have explored common data normalization techniques used in machine learning. The benefits and drawbacks of each technique were also discussed, along with guidance on when to use each based on the dataset characteristics. The study by Box et al. [
15] aimed to develop a framework for time series analysis known as the Box–Jenkins methodology, and the methodology consists of three stages: model identification, parameter estimation, and model checking. The authors demonstrated the effectiveness of the approach through various case studies, including modeling the demand for a particular brand of beer and predicting the number of airline passengers. The study contributed significantly to the development of time series analysis and provided a useful resource for practitioners and researchers in the field.
In the study conducted by Hyndman et al. [
16] a new approach to forecasting time series known as the “forecast” package was introduced. The package provides a range of functions for forecasting, including ARIMA models, exponential smoothing models, and seasonal decomposition methods. The authors also examined methods for evaluating and selecting models for use with various kinds of time series data. The effectiveness of the approach was demonstrated through a range of case studies, including forecasting tourism demand, electricity demand, and stock prices. The authors of [
17,
18] examined automatic forecasting methods for handling a considerable volume of univariate time series, commonly required in business and other fields. Gao et al. [
8] developed four distinct machine-learning models to predict consumer demand for bike sharing in Seoul. The researchers went beyond weather-related features and incorporated additional variables, such as air pollution, traffic information, COVID-19 cases, and socio-economic factors, to enhance the accuracy of their predictions. The dataset used in the study was obtained from the Seoul Public Data Park website, encompassing the counts of public bike rentals in Seoul, South Korea, throughout the year 2020. Among the 29 features categorized into six groups, the weather, pollution, and the COVID-19 outbreak features proved to be the most influential in the model’s prediction performance.
Schuijbroek et al. [
7] delved into BSSs that have gained widespread popularity, with installations in numerous cities worldwide. The study highlighted that the primary operational cost driver for these systems is the bike rebalancing process, aiming to maintain a suitable number of available bikes and open docks for users. To address this challenge, the researchers proposed a new heuristic approach, prioritizing clustering first and routing second. This method addresses a clustering challenge of polynomial size, taking into account both the feasibility of service levels and the approximate routing costs concurrently. Conversely, Philipp Probst et al. [
19] constructed a model using the RF algorithm. This model encompasses numerous user-adjustable hyperparameters, including the count of randomly drawn observations per tree (with or without replacement), the number of randomly selected variables for each split, the criteria for splitting, the minimum necessary samples within a node, and the overall count of trees forming the forest. Zhou [
20] examined Chicago’s spatiotemporal riding pattern using huge BSS data from July to December 2013 and 2014 and used the fast greedy algorithm to find biking flow spatial communities using a bike flow similarity graph. This work found weekday and weekend travel patterns and customer and subscriber travel trends in the noisy large data. Using the hierarchical clustering method, the authors also looked at the temporal demands for bikes and docks.
In a study by [
21], researchers introduced a stacking model to predict variations in public bicycle traffic flow using real-world data. XGBoost was employed to train the models and identify factors influencing public bicycle traffic flow. The features utilized in this study include time, space, history, and weather information. To further enhance the analysis, the authors utilized the K-Medoids algorithm to group bike stations. This was accomplished by creating a novel station correlation matrix that relies on the distance between the stations. Another study conducted by Zhao et al. [
5] proposed a novel hyper-clustering approach to enhance a spatiotemporal deep neural network for traffic prediction in BSSs. This innovative approach captured mobility trends among individuals and clusters, resulting in improved accuracy in predicting the number of available bikes. The experimental findings showed that the spatiotemporal deep neural network model, with hyper-clustering, surpassed previous approaches in accurately predicting bike demand. Dastjerdi and Morency [
22] researched short-term forecasting, specifically predicting shared bike demand in Montreal 15 min ahead, using a deep learning approach. The study started by identifying six communities within the bike-sharing network using the Louvain algorithm based on a set of bike trips. To forecast pickup demand in each community, LSTM-based architectures were utilized. As a benchmark, a univariate ARIMA model was also employed for comparison. In a work by Lee and Ku [
23], an RNN model was proposed, incorporating a dual attention mechanism to extract both spatial and temporal features. The attention mechanism effectively determines and weights all location features in the time series data, facilitating the learning of mutual correlations. Additionally, a random walk mechanism was incorporated during the preprocessing stage to maintain local relationships between bike stations, making the model more adaptable to local location changes across different stations.
To summarize, the literature survey revealed that this is an actively researched area, with a range of models and techniques being used. Some studies have focused on using traditional regression models, while others have explored the effectiveness of more complex machine learning models and time series models. Features such as weather data, time of day, and day of the week are important predictors of bike demand. In addition, some studies have highlighted the benefits of using ensemble models or hybrid approaches that combine different types of models. From the survey, we understand that a few existing studies focus on batch prediction, neglecting the potential of real-time demand forecasting and dynamic optimization. Addressing the long-term trends and sustainability aspects of bike-sharing demand is underexplored. Developing methodologies to provide probabilistic forecasts could enhance the decision-making process for BSS operators and urban planners. Further, bike demand exhibits complex temporal patterns and dynamics influenced by factors like weather, time of day, day of the week, and seasonality. Investigating traditional and contemporary time-series forecasting models capable of effectively capturing these patterns could present a promising avenue for research. Through this research attempt, we propose to develop forecasting methods that address long-term prediction. Also, we focus on selecting appropriate features that can give better predictions. In contrast with other works, we use a set of fine-grained temporal features for prediction. Overall, the literature suggests that the performance may depend on the choice of model, and additional features, such as weather and working day features, contribute more to the performance of the model, and there is a scope for improvement in prediction.
5. Findings and Discussion
The proposed research work explored the temporal dependencies of travel demands using regression and time series models. To identify the correlation between the predictor and target features, correlation analysis has been performed. The study focused on two traditional time-series forecasting models (ARIMA, SARIMA) deep learning methods (LSTM GRU), and an ensemble method (Random Forest). In this section, we discuss the performance of the developed models, and interpret and present our findings. We trained and ran the models using different sets of input features. Initially, we ran using all the features without considering their correlations to the bike demand and found that GRU has performed well by giving lower MSE and MAE values. This is shown in
Figure 8.
Then, we ran the models with selected features, and these features have been selected using a correlation-based selection method. First, we took “mnth”, “hr” and “weekday” attributes as they stand at the top of the list identified by the feature selection method. Then, gradually we added attributes to train the models. The results are shown in
Table 3. We also present the same in
Figure 9 and
Figure 10 for better visualization. From these figures, we can see that GRU performs comparatively better for feature sets 1, 2, 3, and 4. However, RF performs better for feature set 5 in terms of MAE. For feature set 4, GRU gives a low MSE/RMSE value. While analyzing the reasons for such performance, we find that RF performs better because it is good at handling both numerical (“temp”) and categorical features (“hr”, “mnth”, “season”, etc.) and can capture complex relationships in the data. Hence, we understand that RF can be effective for bike demand forecasting, especially when there are multiple relevant categorical and numerical features available. However,, GRU also performs equally better for most of the feature sets. Since the gating mechanisms of GRU enable it to capture long-term dependencies in time series data, which is important for bike demand forecasting, GRU leads to better prediction. As biking patterns and demands are influenced by various factors that might have delayed effects, GRU has effectively modeled these dependencies.
GRU can also work effectively with numerical features, especially if those features are relevant and informative for predicting bike demand. Numerical features might include historical bike demand data, temperature, humidity, or other factors that influence demand patterns. In many real-world scenarios, a combination of both categorical and numerical features is used to capture the complexity of bike demand patterns accurately. The GRU model, being capable of handling both sequential data and additional features, can leverage this information to improve its forecasting performance. Compared to deep learning and ensemble models, there is a significant deviation between actual and predicted variables. Since the ARIMA and SARIMA models are designed to capture linear dependencies in the time series data and the relationship between the target variable and the predictors is non-linear, these models may not be able to capture the underlying patterns effectively, leading to higher prediction MAE and MSE.
In this research, we employed historical bicycle data to conduct long-term forecasting, and this was achieved by leveraging various sets of features outlined in
Table 3. For long-term prediction, we have taken the instances of the last two months of the datasets as the testing data and predicted the demand. We have evaluated the performance of the different time series modeling algorithms and compared them to actual demand and presented in
Table 3. In addition, we have fine-tuned the process of prediction by choosing a different set of features. These features allow the model to capture variations in demand that occur at different times of the day and different days of the week. This enables the model to identify recurring patterns and trends, such as daily commuting patterns, working day and week-end patterns, and off-peak periods. The inclusion of time-related features adds granularity to the understanding of demand fluctuations. By identifying relevant features, the risk of overfitting, the model capturing noise rather than actual patterns, is reduced. The selected features contribute to a more robust and generalizable model.
Still, there are a few unsettled points in dynamic bike demand prediction that require further exploration. A few potential limitations in dynamic bike demand prediction include:
- i.
Special events and occasions can influence bike demand.
- ii.
Changes in infrastructure, such as new bike lanes or changes in public transportation routes, can influence bike demand patterns.
- iii.
Latency in real-time or near-real-time predictions for dynamic bike demand
- iv.
Unforeseen events, such as road closure for maintenance, natural calamities, public health crises (like COVID-19), etc., and social-environmental issues, such as equity and accessibility, can disrupt regular demand patterns.
These points might involve challenges, uncertainties, or areas where more investigation is needed. In addition, there are some methodological challenges to the proposed models which are listed below:
- i.
Data from a single BSS might not be representative of the bike demand patterns of other locations in the city. It could be biased toward specific user demographics, usage patterns, or geographic locations.
- ii.
A BSS in one location may not exhibit the full range of demand patterns that occur across different lotions of a city.
- iii.
Bike demand patterns may change over time due to various factors, including changing user behaviors, weather patterns, and urban developments. The models trained on historical data might struggle to adapt to these evolving patterns.
To check whether the developed models can address the above challenges, we have taken another dataset named the London Bike Sharing Dataset [
29] which contains the bike sharing details collected between January 2015 and December 2016. Various temporal features, such as temperature, season, weather details, wind speed, etc., and predicted bike demand have been recorded in the dataset and contains 17,000 observations approximately. The results of the predictions of the proposed models against this dataset are presented in
Table 4.
Without fine-tuning, we executed the developed models against the London Bike Sharing Dataset. The results indicated that, while the performance was not exceptional, it was not poor. However, we believe that, through the utilization of diverse datasets and suitable feature selection techniques, transfer learning methodologies, and the integration of predictions derived from models trained on various BSS datasets, performance can be enhanced, and a broader spectrum of demand patterns can be captured. While generalizing the models, there will always be some level of fine-tuning and continuous evaluation of models required for each BSS.
6. Conclusions
In this study, we explored and compared five different forecasting models, namely RF, ARIMA, SARIMA, LSTM, and GRU, for predicting bike demand. Before forecasting, we performed an exploratory data analysis to find the correlation between the predictor and target features. Based on the correlation results, we trained and tested the models using different sets of features and found that GRU performs better for different sets of features with the least RMSE value of 51.393. Surprisingly, RF performed better when considering both numerical and categorical features with the least MAE value of 30.36. Through this study, it is demonstrated that the temporal features are crucial for forecasting the demand for bike-sharing. In conclusion, the selection of the best forecasting model for bike demand prediction depends on the specific dataset and the forecasting horizon.
While our research offers insightful information on the effectiveness of various forecasting algorithms, for bike demand prediction, there are several avenues for future work to improve the accuracy and robustness of the predictions. Although this study considers temporal dependencies, several spatial factors shall also be considered in future work. Careful selection and engineering of relevant features can enhance the models’ ability to capture underlying patterns. Further, we intend to develop methods to incorporate real-time data streams to make more up-to-date and accurate predictions for bike demand.