R language exponential smoothing forecast method to analyze the feasibility of time series subsidy policy of Nanjing taxi-hailing software no-load rate…

Report link: http://tecdat.cn/?p=32161

This paper establishes a mathematical model of the empty load rate to help customers analyze the empty load rate of taxis, thus explaining whether the taxi subsidy policy can improve the actual load rate during peak hours and alleviate the difficulty of taking a taxi(Click “Read the original text” at the end of the article to get the complete code data).

Related videos

Analysis ideas

1. Using the data of so many days, first calculate the average daily load rate of this year according to the algorithm, and draw it into a curve

2 Use a smoothing forecast model to calculate the forecast daily average empty load rate for so many days, and the smoothing constants in it are respectively brought into the three values I assumed, and the forecast and actual mean square deviations are calculated, and finally the corresponding one with the smallest mean square deviation is selected. The smoothing constant is what we want.

3. Use the quadratic smoothing index forecasting model to predict the daily average no-load rate from April 25 to May 31 and draw it into a curve (the initial value is the actual daily average no-load rate on April 23, and the smoothing constant is 2 the one you want in

Choose three locations in Nanjing: Drum Tower Park, Sipailou, and Xuanwu Lake Park. Because of the distance and the traffic conditions are similar, measure the taxi demand of these three locations every day from April 1 to April 30. Taxi total.

Data

The data is obtained from the Didi platform:

dd66a980c067f3ae7e802eb0db32d706.png

Analysis method

Take Gulou Park as an example:

7c22bc37a36446a3fed9fd2e7723c1f7.png

Then the empty load rate on April 1st is:

7cd3a91f7a13401ccc26ed94e848d31e.png

Note: Regardless of the carpooling status, it is assumed that a taxi can only take one order.

By analogy, on April 2, April 3, April 4…April 30, the empty load ratios are:

00837debc05348e6707846753105ba44.png

Using the smoothing exponential formula:

de03825cf96f7494809b9da70bc269cf.png

For example: the forecasted empty load rate on April 1st is k, then the forecasted empty load rate on April 2nd

27f87a08839749d552910df8904a93bf.png

We use the algorithm of quadratic smoothing index prediction to predict the short-term empty load rate which is not affected by seasonal factors.

Quadratic Smoothing Exponential Forecasting Model: Formula:

90894e9d0fffdb86c9e3da385d83e9f0.png

Find the empty load ratio

kongzailv=function(datat){
   sum(as.numeric(datat[,2]))/sum(as.numeric(datat[,1]))
}

Location: Gulou Park

for(i in 1:27){
  datat=data[((i-1)*4 + 1):(i*4),3:4]
  kongzailvdata[i]=kongzailv(datat)

Set the alpha parameter to 0.3

alpha <- 0.3

See model parameters

03a5a8bc194c20c5d21b45df0515b12c.png

Calculate the mean square error value

RMSE1=mean((model$fitted-model$x)^2)

4e60a8cb9866fd77d7b22c7710c09553.png

Set the alpha parameter to 0.5

alpha <- 0.5

bb4118046ea045e30730e3fc19589a28.png

Set the alpha parameter to 0.7

457f83fc452ab0c15c81ef4a513e44ea.png

Find the smallest RMSE value

min(RMSE1,RMSE2,RMSE3)

[1] 0.2712489

Therefore, the alpha is 0.5, and then the algorithm of quadratic smoothing index prediction is used to predict the short-term empty load rate which is not affected by seasonal factors.

See model parameters

0cbfddc6dc1f6854965f15c5d5899dae.png

Forecast value

e8cd6a44cf34312d7b29cc3a88f1ab4a.png

Predicted image

72b1d7743f0dd54a7ac71df63780cb4c.png

Click on the title to view previous issues

4555ea6ffe71820cb78760ea4bd11198.jpeg

Spatial and temporal visualization analysis of taxi driving trajectory data in Hangzhou

outside_default.png

Swipe left and right to see more

outside_default.png

01

6cb38aef76a3a5986cd70e88d31f3903.png

02

21c2e7a4c76fa03496629ce3792b2bee.png

03

691f20889657af88f4d8dfb19eabaacc.png

04

712bbcf15dd53fdc7e24fe3e989012bc.png

District: Four Pailou

which.min(c(RMSE1,RMSE2,RMSE3))

## [1] 3

 ###From the results, it can be seen that when alphaha is 0.7, the minimum RMSE value of the channel

Therefore, the alpha is 0.7, and then the algorithm of quadratic smoothing index prediction is used to predict the short-term no-load rate that is not affected by seasonal factors.

See model parameters

92f05faf653f6cbd6a54f132dbd18626.png

6342c2cbdb95330393159cf6bb060690.png

Location: Xuanwu Lake Park

############################### Find the minimum RMSE value
 min(RMSE1,RMSE2,RMSE3)

## [1] 0.01964692

 which.min(c(RMSE1,RMSE2,RMSE3))

## [1] 1

 ###From the results, it can be seen that when alphaha is 0.3, the minimum RMSE value of the channel

See model parameters

80d11e71c5859402437b15e198be5381.png

23099455495f1daeb8d1e18538bec541.png

c0947dd6315a3caa16df98e6a91d8036.png

Click “Read the original text” at the end of the article

Get the full text and complete code data materials.

This article is selected from “R Language Exponential Smoothing Forecasting Method to Analyze the Feasibility of Subsidy Policies for No-load Rate of Nanjing Taxi Hailing Software”.

Click on the title to view previous issues

Research Based on Taxi GPS Trajectory Data: Data Analysis of Taxi Trips

Use data to tell you whether the allocation of taxi resources is reasonable

Grasp the pulse of taxi driving data: taxi trajectory data gives you the answer!

Research Based on Taxi GPS Trajectory Data: Data Analysis of Taxi Trips

Use data to tell you whether the allocation of taxi resources is reasonable

Shared bicycle big data report

R language uses Poisson regression, GAM spline model to predict the number of cyclists

Consumer survey on shared car use

New energy vehicle owner data illustrated book

Python research car sensor data statistical visualization analysis

R language ggmap space visualization motor vehicle traffic accident map

R language ggmap spatial visualization of motor vehicle collisions – street map heat map

Application of Python financial time series model ARIMA and GARCH in stock market forecasting

Application of financial time series models ARIMA and GARCH in stock market forecasting

Time series analysis model: ARIMA-ARCH/GARCH model analysis of stock prices

R language ARIMA-GARCH volatility model predicts stock market Apple’s daily return time series

Time series analysis model in R language: ARIMA-ARCH/GARCH model analysis of stock prices

R language multivariate Copula GARCH model time series forecasting

copulas in python: Frank, Clayton, and Gumbel copula model estimation and visualization

Copula GARCH model fitting time series and simulation analysis in R language

Matlab uses Copula simulation to optimize market risk data VaR analysis

R language multivariate Copula GARCH model time series forecasting

R language Copula function stock market correlation modeling: Simulate Random Walk (random walk)

R Language Implements Copula Algorithm Modeling Dependency Case Analysis Report

R language ARMA-GARCH-COPULA model and financial time series case

Research on the diagnostic accuracy of Bayesian hierarchical mixed model based on copula in R language

R language COPULA and financial time series case

Matlab uses Copula simulation to optimize market risk data VaR analysis

Matlab uses Copula simulation to optimize market risk

R language multivariate CopulaGARCH model time series forecasting

Bayesian Nonparametric MCMC Estimation of Copula in R Language

R language COPULAS and financial time series

R language multiplicative GARCH model for volatility prediction of high-frequency trading data

R language GARCH-DCC model and DCC (MVT) modeling estimation

Python uses GARCH, EGARCH, GJR-GARCH model and Monte Carlo simulation for stock price prediction

R language time series GARCH model analysis of stock market volatility

R language ARMA-EGARCH model and integrated forecasting algorithm to predict the actual volatility of SPX

Matlab implements MCMC’s Markov transformation ARMA-GARCH model estimation

Python uses GARCH, EGARCH, GJR-GARCH model and Monte Carlo simulation for stock price prediction

ARIMA + GARCH trading strategy for S&P500 stock index using R language

R language uses multivariate ARMA, GARCH, EWMA, ETS, stochastic volatility SV model to model financial time series data

R language stock market index: ARMA-GARCH model and exploratory analysis of logarithmic return data

R language multivariate Copula GARCH model time series forecasting

R language uses multivariate AR-GARCH model to measure market risk

Time series analysis model in R language: ARIMA-ARCH/GARCH model analysis of stock prices

R language uses Garch model and regression model to analyze stock prices

VaR comparison of GARCH(1,1), MA and historical simulation methods

Matlab estimates arma garch conditional mean and variance model

R language ARMA-GARCH-COPULA model and financial time series case

04f9b1cf309f17367c6b2f9e6b835ba7.png

cc620441c34ae9a6f16f3693d3121b1c>.jpeg</p>
<p><img src=