時(shí)序預(yù)測(cè) | MATLAB實(shí)現(xiàn)CNN-BiLSTM卷積雙向長(zhǎng)短期記憶神經(jīng)網(wǎng)絡(luò)時(shí)間序列預(yù)測(cè)(風(fēng)電功率預(yù)測(cè))
預(yù)測(cè)效果
基本介紹
1.MATLAB實(shí)現(xiàn)CNN-BiLSTM卷積雙向長(zhǎng)短期記憶神經(jīng)網(wǎng)絡(luò)時(shí)間序列預(yù)測(cè)(風(fēng)電功率預(yù)測(cè));
2.運(yùn)行環(huán)境為Matlab2021b;
3.單個(gè)變量時(shí)間序列預(yù)測(cè);
4.data為數(shù)據(jù)集,單個(gè)變量excel數(shù)據(jù),MainCNN_BiLSTMTS.m為主程序,運(yùn)行即可,所有文件放在一個(gè)文件夾;
5.命令窗口輸出R2、MSE、RMSE、MAE、MAPE多指標(biāo)評(píng)價(jià);文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-699020.html
程序設(shè)計(jì)
- 完整源碼和數(shù)據(jù)獲取方式:私信博主回復(fù)MATLAB實(shí)現(xiàn)CNN-BiLSTM卷積雙向長(zhǎng)短期記憶神經(jīng)網(wǎng)絡(luò)時(shí)間序列預(yù)測(cè)(風(fēng)電功率預(yù)測(cè));
%% 預(yù)測(cè)
t_sim1 = predict(net, p_train);
t_sim2 = predict(net, p_test );
%% 數(shù)據(jù)反歸一化
T_sim1 = mapminmax('reverse', t_sim1, ps_output);
T_sim2 = mapminmax('reverse', t_sim2, ps_output);
%% 均方根誤差
error1 = sqrt(sum((T_sim1' - T_train).^2) ./ M);
error2 = sqrt(sum((T_sim2' - T_test ).^2) ./ N);
%% 相關(guān)指標(biāo)計(jì)算
% MAE
mae1 = sum(abs(T_sim1' - T_train)) ./ M ;
mae2 = sum(abs(T_sim2' - T_test )) ./ N ;
disp(['訓(xùn)練集數(shù)據(jù)的MAE為:', num2str(mae1)])
disp(['測(cè)試集數(shù)據(jù)的MAE為:', num2str(mae2)])
%% 平均絕對(duì)百分比誤差MAPE
MAPE1 = mean(abs((T_train - T_sim1')./T_train));
MAPE2 = mean(abs((T_test - T_sim2')./T_test));
disp(['訓(xùn)練集數(shù)據(jù)的MAPE為:', num2str(MAPE1)])
disp(['測(cè)試集數(shù)據(jù)的MAPE為:', num2str(MAPE2)])
% MBE
mbe1 = sum(abs(T_sim1' - T_train)) ./ M ;
mbe2 = sum(abs(T_sim1' - T_train)) ./ N ;
disp(['訓(xùn)練集數(shù)據(jù)的MBE為:', num2str(mbe1)])
disp(['測(cè)試集數(shù)據(jù)的MBE為:', num2str(mbe2)])
%均方誤差 MSE
mse1 = sum((T_sim1' - T_train).^2)./M;
mse2 = sum((T_sim2' - T_test).^2)./N;
disp(['訓(xùn)練集數(shù)據(jù)的MSE為:', num2str(mse1)])
disp(['測(cè)試集數(shù)據(jù)的MSE為:', num2str(mse2)])
參考資料
[1] https://blog.csdn.net/kjm13182345320/article/details/128577926?spm=1001.2014.3001.5501
[2] https://blog.csdn.net/kjm13182345320/article/details/128573597?spm=1001.2014.3001.5501文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-699020.html
到了這里,關(guān)于時(shí)序預(yù)測(cè) | MATLAB實(shí)現(xiàn)CNN-BiLSTM卷積雙向長(zhǎng)短期記憶神經(jīng)網(wǎng)絡(luò)時(shí)間序列預(yù)測(cè)(風(fēng)電功率預(yù)測(cè))的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!