Time series prediction | Matlab implements CNN-XGBoost convolutional neural network combined with extreme gradient boosting tree time series prediction

Time series prediction | Matlab implements CNN-XGBoost convolutional neural network combined with extreme gradient boosting tree time series prediction

List of effects

insert image description here

insert image description here

insert image description here

Basic description

Time series prediction | Matlab implements CNN-XGBoost convolutional neural network combined with extreme gradient boosting tree time series prediction.
Matlab implements CNN-XGBoost convolutional neural network combined with extreme gradient boosting tree time series prediction (complete source code and data)
1. data is a data set, a univariate time series data set.
2. CNN_XGBoostTS.m is the main program file, and the others are function files, which do not need to be run;
3. Evaluation indicators R2, MAE, MAPE, MSE, RMSE;
4. Note that the program and data are placed in a folder, and the folder cannot be named XGBoost , because some functions have been used, and the operating environment is Matlab2020 and above.

programming

Function_name='F1'; % Name of the test function that can be 
end
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%%  设置必要的指针
h_test_ptr = libpointer;
h_test_ptr_ptr = libpointer('voidPtrPtr', h_test_ptr);
test_ptr = libpointer('singlePtr', single(p_test));
calllib('xgboost', 'XGDMatrixCreateFromMat', test_ptr, rows, cols, model.missing, h_test_ptr_ptr);
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%%  预测
out_len_ptr = libpointer('uint64Ptr', uint64(0));
f = libpointer('singlePtr');
f_ptr = libpointer('singlePtrPtr', f);
calllib('xgboost', 'XGBoosterPredict', h_booster_ptr, h_test_ptr, int32(0), uint32(0), int32(0), out_len_ptr, f_ptr);
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%%  提取预测
n_outputs = out_len_ptr.Value;
setdatatype(f, 'singlePtr', n_outputs);
————————————————
版权声明:本文为CSDN博主「机器学习之心」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/kjm13182345320/article/details/124929272

References

[1] https://blog.csdn.net/kjm13182345320/article/details/127596777?spm=1001.2014.3001.5501
[2] https://download.csdn.net/download/kjm13182345320/86830096?spm=1001.2014.3001.5501

Guess you like

Origin blog.csdn.net/kjm13182345320/article/details/132626760