xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 2KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-02
  • 語言: Matlab
  • 標簽: matlab??grnn??

資源簡介

用matlab簡單實現(xiàn)grnn,代碼注釋中含有對grnn網(wǎng)絡原理的解釋,可直接拿來做模版。

資源截圖

代碼片段和文件信息

%GRNN網(wǎng)絡net=newgrnn(PTSPREAD)
%采用統(tǒng)計學原理,有四層,模式層與樣本個數(shù)相同,激活函數(shù)與統(tǒng)計里面的一個式子構(gòu)成相同
%求和層與輸出個數(shù)相同,就是將模式層輸出相加,輸出是將求和層相除
clc
clear
x=zeros(10200);
y=zeros(3200);
input=x(:1:190);
output=y(:1:190);
test_input=x(:191:200);
test_output=y(:191:200);
desired_spread=[];
mse_max=10e20;
desired_input=[];
desired_output=[];
result_perf=[];
indices=crossvalind(‘Kfold‘length(input)4);%分成4批
k=1;
for?i=1:4
????pref=[];
????disp([‘...‘num2str(i)‘...‘]);
????test=(indices==i);
????train=~test;
????p_cv_train=input(:train);
????t_cv_train=output(:train);
????p_cv_test=input(:test);
????t_cv_test=output(:test);
????[p_cx_trainminpmaxpt_cv_trainmintmaxt]=premnmx(p_cv_traint_cv_train);
????p_cv_test=tramnmx(p_cv_testminpmaxp);
????for?spread=0.1:0.1:2
????????net=newgrnn(p_cv_traint_cv_trainspread);
????????t_cv_test_sim=sim(netp_cv_test);
????????t_cv_test_sim=postmnmx(t_cv_test_simmintmaxt);
????????error=t_cv_test-t_cv_test_sim;
????????perf=[perfmse(error)];
????????if?mse(error)????????????mse_max=mse(error);
????????????desired_spread=spread;
????????????desired_input=p_cv_train;
????????????desired_output=t_cv_train;
????????end
????????k=k+1;
????end
????result_perf(i:)=perf;
end
%相當于排除了訓練集中的一部分元素,找了擬合最好的一部分
net=newgrnn(desired_inputdesired_outputdesired_spread);
p_test=tramnx(p_testminpmaxp);
grnn_pre=sim(netp_test);
grnn_pre=postmnmx(grnn_premintmaxt);













?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-07-23?00:49??GRNN紲炵粡緗戠粶\
?????文件????????1513??2019-07-23?00:47??GRNN紲炵粡緗戠粶\aaa.m
?????目錄???????????0??2019-08-26?12:09??__MACOSX\
?????目錄???????????0??2019-08-26?12:09??__MACOSX\GRNN紲炵粡緗戠粶\
?????文件?????????176??2019-07-23?00:47??__MACOSX\GRNN紲炵粡緗戠粶\._aaa.m

評論

共有 條評論