An integrated approach for the city-scale near real-time parking occupancy prediction
# Meta TSD-GRU is proposed for near real-time parking occupancy prediction on the city scale. Abstract: In a city, the usage optimization of parking spaces with a near-real time response to car drivers can significantly reduce the unnecessary cruising for parking and additional congestions of regional traffic. As the foundation to achieve such an optimization, a parking occupancy prediction model is required to address emerging challenges of training a simple but effective model rapidly. To fill the gap, this paper proposes a novel approach, which enables an integration of Time Series Decomposition (TSD), Gate Recurrent Unit (GRU) and First-order Model-agnostic Meta-learning (FOMAML) for feature engineering, model building, and model pre-training respectively. Moreover, as shown by a detailed evaluation, such an integration strengthens the proposed approach, named Meta TSD-GRU, which outperforms other state-of-the-art methods with 1) prediction errors reduced about 45%, 2) the speed of model adaptation and convergence improved about 2 and 10^2 times against the model with and without pre-training, and 3) the generalizability of the model enhanced to handle various time intervals of forecasting and types of parking lots under a consistent and stable performance. Dataset: There are 30 parking lots in the downtown area of Guangzhou city in this dataset, including 10 commercial building parking lots, 3 hospital parking lots, 5 office parking lot, 3 sport and recreational facilities parking lots, 4 tourist parking lots, and 5 residential parking lots. The data is from june 1 to june 30, 2018. Time intervial is 5min. v3: added result, plot and baselines. If you have any questions, please send an email to the following mailbox. Thanks for using. Author: quhaoh Mail: email@example.com firstname.lastname@example.org
Steps to reproduce
The proposed method is implemented on PyTorch. Please install relevant modules first. Step 0: Data preprocessing (optional) Run Fourier.py, output the Cycle term, and create a new column FS in origin data. Then compute the Effect term and create another new column INDICATOR in the files. This step has been pre-completed. Step 1: Input data Open 'Meta TSD-GRU.py', task0 is the target task for testing, other tasks are used for pre-training, please type in the right Path and Filename. Step 2: Set hyperparameter task_num represents the number of pre-training tasks. period_length: n * 5min, (such as n=6 for 30min prediction) Step 3: Run and output Run 'Meta TSD-GRU.py', the prediction will be conducted 10 times, output: an average MAPE, the fine-tuning time and epoch.