| 5 | 1/1 | 返回列表 |
| 查看: 1106 | 回復(fù): 3 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||
SimpleGirl金蟲 (正式寫手)
|
[求助]
LS-SVM參數(shù)辨識小測試,歡迎各位大神入貼交流
|
|
|
本人近期在用ls-SVM對線性系統(tǒng)做參數(shù)辨識,因?yàn)槭蔷性系統(tǒng)所以采用線性核函數(shù),然后根據(jù)得到的model.alpha與輸入數(shù)據(jù)相乘得到辨識參數(shù)。但結(jié)果與實(shí)際的誤差過大,不明白什么原因?還請各位大神給些意見。 matlab版本為:R2014b, ls-svm的版本為:Matlab R2009b - R2013a: LS-SVMlab1.8 - Linux and Windows (32 and 64 bit) 電腦系統(tǒng):windows 8.1 為測試ls-svm,寫了如下代碼: %%%%%%%%% %% 辨識 y(k+1) = Ay(k) + Bx(k)的系數(shù)A和B %% 為測試lssvm的參數(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ù)的,出來的結(jié)果達(dá)到了十位數(shù)了,但原始值才為1. 還請給位大神賜教。!拜托拜托了。 |

新蟲 (初入文壇)
新蟲 (初入文壇)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 275求調(diào)劑 +10 | Micky11223 2026-03-25 | 14/700 |
|
|---|---|---|---|---|
|
[考研] 復(fù)試調(diào)劑 +3 | raojunqi0129 2026-03-28 | 3/150 |
|
|
[考研] 070305高分子化學(xué)與物理 304分求調(diào)劑 +4 | c297914 2026-03-28 | 4/200 |
|
|
[考研] 085600,材料與化工321分求調(diào)劑 +9 | 大饞小子 2026-03-28 | 9/450 |
|
|
[考研] 322求調(diào)劑 +5 | 舊吢 2026-03-24 | 5/250 |
|
|
[考研] 0703一志愿9,初試成績:338,四六級已過,有科研經(jīng)歷,求調(diào)劑! +4 | Zuhui0306 2026-03-25 | 4/200 |
|
|
[考研] 一志愿哈爾濱工業(yè)大學(xué)材料與化工方向336分 +8 | 辰沐5211314 2026-03-26 | 8/400 |
|
|
[考研] 求調(diào)劑推薦 材料 304 +15 | 荷包蛋hyj 2026-03-26 | 15/750 |
|
|
[考研] 331環(huán)境科學(xué)與工程求調(diào)劑 +3 | 熠然好運(yùn)氣 2026-03-27 | 3/150 |
|
|
[考研] 303求調(diào)劑 +7 | 安憶靈 2026-03-22 | 8/400 |
|
|
[考研] 求調(diào)劑 +3 | 劉柯@ 2026-03-24 | 4/200 |
|
|
[考研] 315調(diào)劑 +4 | 0860求調(diào)劑 2026-03-26 | 5/250 |
|
|
[考研] 281求調(diào)劑 +3 | 亞克西good 2026-03-26 | 5/250 |
|
|
[考研] 化學(xué)工程085602 305分求調(diào)劑 +17 | RichLi_ 2026-03-25 | 17/850 |
|
|
[考研] 284求調(diào)劑 +15 | Zhao anqi 2026-03-22 | 15/750 |
|
|
[考研]
|
黃粱一夢千年 2026-03-24 | 3/150 |
|
|
[考研] 一志愿吉大化學(xué)322求調(diào)劑 +4 | 17501029541 2026-03-23 | 6/300 |
|
|
[考研] 材料/農(nóng)業(yè)專業(yè),07/08開頭均可,過線就行 +3 | 呵唔哦豁 2026-03-23 | 4/200 |
|
|
[考研] 293求調(diào)劑 +3 | 濤濤Wjt 2026-03-22 | 5/250 |
|
|
[考研] 315分,誠求調(diào)劑,材料與化工085600 +3 | 13756423260 2026-03-22 | 3/150 |
|