資源簡介
svm參數(shù)的優(yōu)化算法——遺傳算法,在使用SVM時(shí)用于優(yōu)化核函數(shù)的兩個(gè)參數(shù)
代碼片段和文件信息
%%?SVM神經(jīng)網(wǎng)絡(luò)中的參數(shù)優(yōu)化---如何更好的提升分類器的性能?
%%?清空環(huán)境變量
function?chapter13_GA
close?all;
clear;
clc;
format?compact;
%%?數(shù)據(jù)提取
%?載入測(cè)試數(shù)據(jù)wine其中包含的數(shù)據(jù)為classnumber?=?3wine:178*13的矩陣wine_labes:178*1的列向量
load?chapter13_wine.mat;
%?畫出測(cè)試數(shù)據(jù)的box可視化圖
figure;
boxplot(wine‘orientation‘‘horizontal‘‘labels‘categories);
title(‘wine數(shù)據(jù)的box可視化圖‘‘FontSize‘12);
xlabel(‘屬性值‘‘FontSize‘12);
grid?on;
%?畫出測(cè)試數(shù)據(jù)的分維可視化圖
figure
subplot(351);
hold?on
for?run?=?1:178
????plot(runwine_labels(run)‘*‘);
end
xlabel(‘樣本‘‘FontSize‘10);
ylabel(‘類別標(biāo)簽‘‘FontSize‘10);
title(‘class‘‘FontSize‘10);
for?run?=?2:14
????subplot(35run);
????hold?on;
????str?=?[‘a(chǎn)ttrib?‘num2str(run-1)];
????for?i?=?1:178
????????plot(iwine(irun-1)‘*‘);
????end
????xlabel(‘樣本‘‘FontSize‘10);
????ylabel(‘屬性值‘‘FontSize‘10);
????title(str‘
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????6311??2014-03-07?17:39??GA_SVM\chapter13_GA.m
?????目錄??????????0??2014-04-04?20:27??GA_SVM
-----------?---------??----------?-----??----
?????????????????6311????????????????????2
評(píng)論
共有 條評(píng)論