Interval prediction | MATLAB implements multivariate time series interval prediction based on QRCNN-BiGRU convolution bidirectional gated recurrent unit

Interval prediction | MATLAB implements multivariate time series interval prediction based on QRCNN-BiGRU convolution bidirectional gated recurrent unit

List of effects

1

2

3

4

5

6

7

basic introduction

1. Matlab implements multivariate time series interval prediction based on QRCNN-BiGRU convolutional neural network combined with bidirectional gated recurrent unit;
2. Multi-map output, point prediction and multi-index output (MAE, MAPE, RMSE, MSE, R2), interval prediction Multi-finger ratio output (interval coverage rate PICP, interval average width percentage PINAW), multi-input single output, including point prediction map, different confidence interval prediction map, error analysis map, kernel density estimation probability density map; 3. data is a data
set , the power data set, using multiple associated variables to predict the last column of power data, can also be applied to load forecasting and wind speed forecasting; MainQRCNN_BiGRUNTS is the main program, and the rest are function files, which do not need to be run; 4. The code is of high quality, with clear comments,
including In the data preprocessing part, the missing value is processed, if it is nan, it is deleted, and the kernel density estimation is also included;
5. The operating environment is Matlab2021 and above.

Model description

QRCNN-BiGRU is a deep learning model for interval forecasting of multivariate time series. The model combines convolutional neural network (CNN), bidirectionally gated recurrent unit (BiGRU) and quantized regression (QR) techniques to improve prediction accuracy.
In this model, the convolutional neural network is used to extract the local features of the time series, and the bidirectional gated recurrent unit is used to capture the long-term dependencies of the time series. Quantitative regression techniques are used to adjust the forecast results of the model according to the distribution of forecast errors, thereby improving the stability and accuracy of forecasts.
The prediction process of the model is divided into two steps: first, use QRCNN to extract features, and input the features into BiGRU for time series analysis; second, use quantitative regression technology to obtain the predicted interval range. This method can effectively reduce the prediction error and improve the prediction accuracy.
In summary, the QRCNN-BiGRU model is an advanced deep learning model for multivariate time series interval prediction with excellent accuracy and stability.

programming

  • Complete program and data acquisition method: private message blogger.
ntrain=round(nwhole*num_size);
	ntest =nwhole-ntrain;
	% 准备输入和输出训练数据
	input_train =input(:,temp(1:ntrain));
	output_train=output(:,temp(1:ntrain));
	% 准备测试数据
	input_test =input(:, temp(ntrain+1:ntrain+ntest));
	output_test=output(:,temp(ntrain+1:ntrain+ntest));
	%% 数据归一化
	method=@mapminmax;
	[inputn_train,inputps]=method(input_train);
	inputn_test=method('apply',input_test,inputps);
	[outputn_train,outputps]=method(output_train);
	outputn_test=method('apply',output_test,outputps);
	% 创建元胞或向量,长度为训练集大小;
	XrTrain = cell(size(inputn_train,2),1);
	YrTrain = zeros(size(outputn_train,2),1);
	for i=1:size(inputn_train,2)
		XrTrain{
    
    i,1} = inputn_train(:,i);
		YrTrain(i,1) = outputn_train(:,i);
	end
	% 创建元胞或向量,长度为测试集大小;
	XrTest = cell(size(inputn_test,2),1);
	YrTest = zeros(size(outputn_test,2),1);
	for i=1:size(input_test,2)
		XrTest{
    
    i,1} = inputn_test(:,i);
		YrTest(i,1) = outputn_test(:,i);
	end

	%% 创建混合网络架构
%%  区间覆盖率
RangeForm = [T_sim(:, 1), T_sim(:, end)];
Num = 0;

for i = 1 : length(T_train)
    Num = Num +  (T_train(i) >= RangeForm(i, 1) && T_train(i) <= RangeForm(i, 2));
end

picp = Num / length(T_train);     


    S = cumtrapz(X,Y);
    Index = find(abs(m-S)<=1e-2);
    Q = X(max(Index));



References

[1] https://blog.csdn.net/kjm13182345320/article/details/127931217
[2] https://blog.csdn.net/kjm13182345320/article/details/127418340

Guess you like

Origin blog.csdn.net/kjm13182345320/article/details/131116109
Recommended