| 4 | 1/1 | 返回列表 |
| 查看: 1107 | 回復(fù): 3 | ||
SimpleGirl金蟲 (正式寫手)
|
[求助]
LS-SVM參數(shù)辨識(shí)小測(cè)試,歡迎各位大神入貼交流
|
|
本人近期在用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 為測(cè)試ls-svm,寫了如下代碼: %%%%%%%%% %% 辨識(shí) y(k+1) = Ay(k) + Bx(k)的系數(shù)A和B %% 為測(cè)試lssvm的參數(shù)辨識(shí)功能,在假定A=B=1的情況下進(jìn)行以下測(cè)試試驗(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ā)表 | |
|---|---|---|---|---|
|
[考研] 070305高分子化學(xué)與物理 304分求調(diào)劑 +5 | c297914 2026-03-28 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 085600,專業(yè)課化工原理,321分求調(diào)劑 +3 | 大饞小子 2026-03-28 | 3/150 |
|
|
[考研] 學(xué)碩274求調(diào)劑 +8 | Li李魚 2026-03-26 | 8/400 |
|
|
[考研] 085404求調(diào)劑,總分309,本科經(jīng)歷較為豐富 +4 | 來財(cái)aa 2026-03-25 | 4/200 |
|
|
[考研] 295求調(diào)劑 +5 | 1428151015 2026-03-27 | 6/300 |
|
|
[考研] 086000調(diào)劑 +3 | 7901117076 2026-03-26 | 3/150 |
|
|
[考研] 322求調(diào)劑 +4 | 我真的很想學(xué)習(xí) 2026-03-23 | 4/200 |
|
|
[考研] 324求調(diào)劑 +5 | hanamiko 2026-03-26 | 5/250 |
|
|
[考研] 求調(diào)劑,一志愿 南京航空航天大學(xué)大學(xué) ,080500材料科學(xué)與工程學(xué)碩 +4 | @taotao 2026-03-26 | 5/250 |
|
|
[考研] 325求調(diào)劑 +5 | 李嘉圖·S·路 2026-03-23 | 5/250 |
|
|
[考研] 351求調(diào)劑 +4 | 麥克阿磊 2026-03-24 | 4/200 |
|
|
[考研] 材料考研求調(diào)劑 +3 | Dendel 2026-03-23 | 6/300 |
|
|
[考研] 一志愿中南大學(xué)化學(xué)學(xué)碩0703總分337求調(diào)劑 +7 | niko- 2026-03-22 | 7/350 |
|
|
[考研] 考研一志愿蘇州大學(xué)初始315(英一)求調(diào)劑 +3 | sbdksD 2026-03-24 | 4/200 |
|
|
[考研] 0854人工智能方向招收調(diào)劑 +4 | 章小魚567 2026-03-24 | 4/200 |
|
|
[考研] 0854電子信息求調(diào)劑 324 +4 | Promise-jyl 2026-03-23 | 4/200 |
|
|
[考研] 求調(diào)劑 +6 | 研研,接電話 2026-03-24 | 7/350 |
|
|
[考研] 292求調(diào)劑 +4 | 鵝鵝鵝額額額額?/a> 2026-03-24 | 4/200 |
|
|
[考研] 接收2026碩士調(diào)劑(學(xué)碩+專碩) +4 | allen-yin 2026-03-23 | 6/300 |
|
|
[考研] 求調(diào)劑 +5 | Zhangbod 2026-03-21 | 7/350 |
|