91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

SVM的數據分類預測—意大利葡萄酒種類識別的matlab源程序與數據 - SVM prediction data classification - Italian Wine type recognition matlab source code and data

資源截圖

代碼片段和文件信息

%%?SVM神經網絡的數據分類預測----意大利葡萄酒種類識別
%?
%?
%?
%? 該案例作者申明: 1:本人長期駐扎在此板塊里,對該案例提問,做到有問必答。 2:此案例有配套的教學視頻,配套的完整可運行Matlab程序。 3:以下內容為該案例的部分內容(約占該案例完整內容的1/10)。 4:此案例為原創案例,轉載請注明出處(Matlab中文論壇,《Matlab神經網絡30個案例分析》)。 5:若此案例碰巧與您的研究有關聯,我們歡迎您提意見,要求等,我們考慮后可以加在案例里。 6:您看到的以下內容為初稿,書籍的實際內容可能有少許出入,以書籍實際發行內容為準。 7:此書其他常見問題、預定方式等,請點擊這里。
%?
%?


%%?清空環境變量
close?all;
clear;
clc;
format?compact;
%%?數據提取

%?載入測試數據wine其中包含的數據為classnumber?=?3wine:178*13的矩陣wine_labes:178*1的列向量
load?chapter12_wine.mat;

%?畫出測試數據的box可視化圖
figure;
boxplot(wine‘orientation‘‘horizontal‘‘labels‘categories);
title(‘wine數據的box可視化圖‘‘FontSize‘12);
xlabel(‘屬性值‘‘FontSize‘12);
grid?on;

%?畫出測試數據的分維可視化圖
figure
subplot(351);
hold?on
for?run?=?1:178
????plot(runwine_labels(run)‘*‘);
end
xlabel(‘樣本‘‘FontSize‘10);
ylabel(‘類別標簽‘‘FontSize‘10);
title(‘class‘‘FontSize‘10);
for?run?=?2:14
????subplot(35run);
????hold?on;
????str?=?[‘attrib?‘num2str(run-1)];
????for?i?=?1:178
????????plot(iwine(irun-1)‘*‘);
????end
????xlabel(‘樣本‘‘FontSize‘10);
????ylabel(‘屬性值‘‘FontSize‘10);
????title(str‘FontSize‘10);
end

%?選定訓練集和測試集

%?將第一類的1-30第二類的60-95第三類的131-153做為訓練集
train_wine?=?[wine(1:30:);wine(60:95:);wine(131:153:)];
%?相應的訓練集的標簽也要分離出來
train_wine_labels?=?[wine_labels(1:30);wine_labels(60:95);wine_labels(131:153)];
%?將第一類的31-59第二類的96-130第三類的154-178做為測試集
test_wine?=?[wine(31:59:);wine(96:130:);wine(154:178:)];
%?相應的測試集的標簽也要分離出來
test_wine_labels?=?[wine_labels(31:59);wine_labels(96:130);wine_labels(154:178)];

%%?數據預處理
%?數據預處理將訓練集和測試集歸一化到[01]區間

[mtrainntrain]?=?size(train_wine);
[mtestntest]?=?size(test_wine);

dataset?=?[train_wine;test_wine];
%?mapminmax為MATLAB自帶的歸一化函數
[dataset_scaleps]?=?mapminmax(dataset‘01);
dataset_scale?=?dataset_scale‘;

train_wine?=?dataset_scale(1:mtrain:);
test_wine?=?dataset_scale(?(mtrain+1):(mtrain+mtest):?);
%%?SVM網絡訓練
model?=?svmtrain(train_wine_labels?train_wine?‘-c?2?-g?1‘);

%%?SVM網絡預測
[predict_label?accuracy?decisio

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????4159??2015-07-16?16:25??SVM的數據分類預測——意大利葡萄酒種類識別\chapter12.m

?????文件??????20168??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\chapter12_wine.mat

?????文件??????15003??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html\chapter12.html

?????文件???????3348??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html\chapter12.png

?????文件???????6809??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html\chapter12_01.png

?????文件??????10845??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html\chapter12_02.png

?????文件???????9026??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html\chapter12_03.png

?????目錄??????????0??2015-07-15?21:44??SVM的數據分類預測——意大利葡萄酒種類識別\html

?????目錄??????????0??2015-07-16?16:33??SVM的數據分類預測——意大利葡萄酒種類識別

-----------?---------??----------?-----??----

????????????????69358????????????????????9


評論

共有 條評論