| 4 | 1/1 | 返回列表 |
| 查看: 1103 | 回復(fù): 3 | ||
SimpleGirl金蟲 (正式寫手)
|
[求助]
LS-SVM參數(shù)辨識(shí)小測試,歡迎各位大神入貼交流
|
|
本人近期在用ls-SVM對(duì)線性系統(tǒng)做參數(shù)辨識(shí),因?yàn)槭蔷性系統(tǒng)所以采用線性核函數(shù),然后根據(jù)得到的model.alpha與輸入數(shù)據(jù)相乘得到辨識(shí)參數(shù)。但結(jié)果與實(shí)際的誤差過大,不明白什么原因?還請(qǐng)各位大神給些意見。 matlab版本為:R2014b, ls-svm的版本為:Matlab R2009b - R2013a: LS-SVMlab1.8 - Linux and Windows (32 and 64 bit) 電腦系統(tǒng):windows 8.1 為測試ls-svm,寫了如下代碼: %%%%%%%%% %% 辨識(shí) y(k+1) = Ay(k) + Bx(k)的系數(shù)A和B %% 為測試lssvm的參數(shù)辨識(shí)功能,在假定A=B=1的情況下進(jìn)行以下測試試驗(yàn) clc clear all close all y = randperm(101); input1 = y(1:100); output = y(2:101); x = output - input1; input2 = x; input = zeros(length(input1),2); input(:,1) = input2'; input(:,2) = input1'; output = output'; %%%%%%%%%%%%%% type = 'function estimation'; kernel= 'lin_kernel'; gam = 100; % Regularization parameter sig= []; %% =====================optimizate parameters====================== costfun = 'crossvalidatelssvm'; costfun_args = {10,'mse'}; optfun = 'gridsearch'; model = initlssvm(input,output,type,gam,sig,kernel); % 模型初始化 model = tunelssvm(model,optfun,costfun,costfun_args); % 模型參數(shù)優(yōu)化 %% ======================test data======================= model = trainlssvm(model); % 訓(xùn)練 outputPre = simlssvm(model,input); %%%error%%%% error = zeros(size(outputPre)); error = output - outputPre; % figure(3); subplot(2,1,1); plot(1:length(output),output,'r+:',1:length(outputPre),outputPre,'bo:'); legend('test','predict'); subplot(2,1,2); plot(1:length(error),error); sumc=zeros(1,2); for i = 1:1:length(input) sumc(1,1) = sumc(1,1) + model.alpha(i)*input(i,1); sumc(1,2) = sumc(1,2) + model.alpha(i)*input(i,2); end sumc是用來計(jì)算辨識(shí)系數(shù)的,出來的結(jié)果達(dá)到了十位數(shù)了,但原始值才為1. 還請(qǐng)給位大神賜教。!拜托拜托了。 |

新蟲 (初入文壇)
新蟲 (初入文壇)
| 4 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0856,材料與化工321分求調(diào)劑 +12 | 大饞小子 2026-03-27 | 13/650 |
|
|---|---|---|---|---|
|
[考研] 340求調(diào)劑 +5 | jhx777 2026-03-27 | 5/250 |
|
|
[考研] 070300求調(diào)劑306分 +3 | 26要上岸 2026-03-27 | 3/150 |
|
|
[考研] 272求調(diào)劑 +7 | 腳滑的守法公民 2026-03-27 | 7/350 |
|
|
[考研] 一志愿南師大0703化學(xué) 275求調(diào)劑 +4 | Ripcord上岸 2026-03-27 | 4/200 |
|
|
[考研] 材料與化工085600,總分304,本科有兩篇sci參與,求調(diào)劑 +10 | 幸運(yùn)的醬醬 2026-03-22 | 12/600 |
|
|
[考研] 308求調(diào)劑 +7 | 墨墨漠 2026-03-25 | 7/350 |
|
|
[考研] 考研調(diào)劑 +9 | 小蠟新筆 2026-03-26 | 9/450 |
|
|
[考研] 324求調(diào)劑 +5 | hanamiko 2026-03-26 | 5/250 |
|
|
[考研] 求調(diào)劑323材料與化工 +7 | 1124361 2026-03-24 | 7/350 |
|
|
[考研] 材料與化工328分調(diào)劑 +6 | 。,。,。,。i 2026-03-23 | 6/300 |
|
|
[考研] 334分 一志愿武理-080500 材料求調(diào)劑 +4 | 李李不服輸 2026-03-25 | 4/200 |
|
|
[考研] 0854人工智能方向招收調(diào)劑 +4 | 章小魚567 2026-03-24 | 4/200 |
|
|
[考研] 306求0703調(diào)劑一志愿華中師范 +10 | 紙魚ly 2026-03-21 | 11/550 |
|
|
[考研] 080500求調(diào)劑 +3 | zzzzfan 2026-03-24 | 3/150 |
|
|
[考研] 一志愿山東大學(xué)藥學(xué)學(xué)碩求調(diào)劑 +3 | 開開心心沒煩惱 2026-03-23 | 4/200 |
|
|
[考研] 石河子大學(xué)(211、雙一流)碩博研究生長期招生公告 +3 | 李子目 2026-03-22 | 3/150 |
|
|
[考研] 285求調(diào)劑 +6 | ytter 2026-03-22 | 6/300 |
|
|
[考研] 材料學(xué)碩301分求調(diào)劑 +7 | Liyouyumairs 2026-03-21 | 7/350 |
|
|
[考研] 一志愿深大,0703化學(xué),總分302,求調(diào)劑 +4 | 七月-七七 2026-03-21 | 4/200 |
|