五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【LSTM預測】基于自編LSTM神經(jīng)網(wǎng)絡空調能耗數(shù)據(jù)預測含Matlab源碼

2022-05-19 23:44 作者:Matlab工程師  | 我要投稿

1 簡介

基于自編LSTM神經(jīng)網(wǎng)絡實現(xiàn)空調能耗數(shù)據(jù)預測。

2 部分代碼


%% 程序說明% ?1、數(shù)據(jù)為7天,四個時間點的空調功耗,用前三個推測第四個訓練,依次類推。第七天作為檢驗% ?2、LSTM網(wǎng)絡輸入結點為12,輸出結點為4個,隱藏結點18個clear all;clc;%% 數(shù)據(jù)加載,并歸一化處理[train_data,test_data]=LSTM_data_process();data_length=size(train_data,1);data_num=size(train_data,2);%% 網(wǎng)絡參數(shù)初始化% 結點數(shù)設置input_num=12;cell_num=18;output_num=4;% 網(wǎng)絡中門的偏置bias_input_gate=rand(1,cell_num);bias_forget_gate=rand(1,cell_num);bias_output_gate=rand(1,cell_num);% ab=1.2;% bias_input_gate=ones(1,cell_num)/ab; ? ?end ? ?if(Error_Cost(1,iter)<cost_gate) ? ? ? ?break; ? ?endend%% 繪制Error-Cost曲線圖% for n=1:1:iter% ? ? text(n,Error_Cost(1,n),'*');% ? ? axis([0,iter,0,1]);% ? ? title('Error-Cost曲線圖'); ? % endfor n=1:1:iter ? ?semilogy(n,Error_Cost(1,n),'*'); ? ?hold on; ? ?title('Error-Cost曲線圖'); ? end%% 使用第七天數(shù)據(jù)檢驗%數(shù)據(jù)加載test_final=[0.4557 0.4790 0.7019 0.8211 0.4601 0.4811 0.7101 0.8298 0.4612 0.4845 0.7188 0.8312]';test_final=test_final/sqrt(sum(test_final.^2));test_output=test_data(:,4);%前饋m=4;gate=tanh(test_final'*weight_input_x+h_state(:,m-1)'*weight_input_h);input_gate_input=test_final'*weight_inputgate_x+cell_state(:,m-1)'*weight_inputgate_c+bias_input_gate;forget_gate_input=test_final'*weight_forgetgate_x+cell_state(:,m-1)'*weight_forgetgate_c+bias_forget_gate;output_gate_input=test_final'*weight_outputgate_x+cell_state(:,m-1)'*weight_outputgate_c+bias_output_gate;for n=1:cell_num ? ?input_gate(1,n)=1/(1+exp(-input_gate_input(1,n))); ? ?forget_gate(1,n)=1/(1+exp(-forget_gate_input(1,n))); ? ?output_gate(1,n)=1/(1+exp(-output_gate_input(1,n)));endcell_state_test=(input_gate.*gate+cell_state(:,m-1)'.*forget_gate)';pre_h_state=tanh(cell_state_test').*output_gate;h_state_test=(pre_h_state*weight_preh_h)'test_output

3 仿真結果


4 參考文獻

[1]徐凌峰, 高洪. 基于LSTM神經(jīng)網(wǎng)絡的乘用車能耗預測[J]. 井岡山大學學報:自然科學版, 2021, 42(5):7.

博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡預測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領域的Matlab仿真,相關matlab代碼問題可私信交流。

部分理論引用網(wǎng)絡文獻,若有侵權聯(lián)系博主刪除。




【LSTM預測】基于自編LSTM神經(jīng)網(wǎng)絡空調能耗數(shù)據(jù)預測含Matlab源碼的評論 (共 條)

分享到微博請遵守國家法律
花垣县| 嘉义市| 无极县| 全南县| 灵寿县| 志丹县| 吐鲁番市| 阆中市| 庄浪县| 越西县| 富民县| 河池市| 潮州市| 乐清市| 苏州市| 遂川县| 霍山县| 锦州市| 陕西省| 杭州市| 余江县| 鄂州市| 贺兰县| 英山县| 响水县| 南木林县| 鄢陵县| 文山县| 电白县| 福安市| 迭部县| 龙江县| 凤庆县| 合川市| 公主岭市| 施甸县| 湘阴县| 龙里县| 顺义区| 龙江县| 印江|