克里金三維插值matlab
theta = [10 10]; lob = [1e-1 1e-1]; upb = [20 20];
[dmodel, perf] = dacefit([lat,lon], tem, @regpoly0, @corrgauss, theta, lob, upb);
LonLat = gridsamp([min(latlim) min(lonlim);max(latlim) max(lonlim)], 60);
TemNew = predictor(LonLat, dmodel);
LatNew = reshape(LonLat(:,1),[60,60]);
LonNew = reshape(LonLat(:,2),[60,60]);
TemNew = reshape(TemNew, size(LonNew));
geoshow(LatNew,LonNew,TemNew,'DisplayType','surface');
hold on
plotm(lat,lon,'k.');
colorbar;
matlab中nargin是什麼意思
matlab中epochs是計算時根據輸出誤差返回調整神經元權值和閥值的次數。
驗證方法:
(一)使用網絡 linearlayer
1,cell輸入形式
輸入 P={[1;2] [2;1] [2;3] [3;1]};
目標值 T={4 5 7 7}
使用adapt;
輸入命令:
P={[1;2] [2;1] [2;3] [3;1]};
T={4 5 7 7};
net=linearlayer(0,0.1);
net=configure(net,P,T);
net.IW{1,1}=[0,0];
net.b{1}=0;
[net,a,e]=adapt(net,P,T);
權重更新4次,最後值:
net.IW{1,1}= 1.5600 1.5200
net.b{1}=0.9200
仿真結果:[0] [2] [6.0000] [5.8000]
2,矩陣輸入形式
輸入P=[1 2 2 3;2 1 3 1];
輸出T=[4 5 7 7]
使用adapt;
輸入命令:
P=[1 2 2 3;2 1 3 1];
T=[4 5 7 7];
net=linearlayer(0,0.01);
net=configure(net,P,T);
net.IW{1,1}=[0,0];
net.b{1}=0;
[net,a,e]=adapt(net,P,T);
權重更新一次,最後值:
net.IW{1,1}=0.4900 0.4100
net.b{1}= 0.2300
3,矩陣輸入形式
輸入P=[1 2 2 3;2 1 3 1];
輸出T=[4 5 7 7]
使用train;(其中設置epochs=1)
前提:對學習函數和訓練函數加入顯式的調用命令;
P=[1 2 2 3;2 1 3 1];
T=[4 5 7 7];
net=linearlayer(0,0.01);
net=configure(net,P,T);
net.IW{1,1}=[0,0];
net.b{1}=0;
net=trian(net,P,T);
權重更新一次,最後值:
net.IW{1,1}=0.4900 0.4100
net.b{1}= 0.2300
結論:對於靜態網絡而言linearlayer,adapt的cell輸入爲在線學習,而矩陣輸入爲離線學習相當於train的一個回合。
至於動態網絡:有時間再做。
以上就是使用MATLAB進行克里金三維插值的詳細內容,更多請關注本站其它相關文章!