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

資源簡(jiǎn)介

資源截圖

代碼片段和文件信息

function?[C?sigma]?=?dataset3Params(X?y?Xval?yval)
%EX6PARAMS?returns?your?choice?of?C?and?sigma?for?Part?3?of?the?exercise
%where?you?select?the?optimal?(C?sigma)?learning?parameters?to?use?for?SVM
%with?RBF?kernel
%???[C?sigma]?=?EX6PARAMS(X?y?Xval?yval)?returns?your?choice?of?C?and?
%???sigma.?You?should?complete?this?function?to?return?the?optimal?C?and?
%???sigma?based?on?a?cross-validation?set.
%

%?You?need?to?return?the?following?variables?correctly.
C?=?1;
sigma?=?0.3;
cc=[0.01?0.03?0.1?0.3?1?3?10?30];
ss=[0.01?0.03?0.1?0.3?1?3?10?30];
error=zeros(641);
%?======================?YOUR?CODE?HERE?======================
%?Instructions:?Fill?in?this?function?to?return?the?optimal?C?and?sigma
%???????????????learning?parameters?found?using?the?cross?validation?set.
%???????????????You?can?use?svmPredict?to?predict?the?labels?on?the?cross
%???????????????validation?set.?For?example?
%???????????????????predictions?=?svmPredict(model?Xval);
%???????????????will?return?the?predictions?on?the?cross?validation?set.
%
%??Note:?You?can?compute?the?prediction?error?using?
%????????mean(double(predictions?~=?yval))
%
for?i=1:length(cc)
????for?j=1:length(ss)
????????model=?svmTrain(X?ycc(i)?@(x1?x2)?gaussianKernel(x1?x2?ss(j)));?
????????predict=svmPredict(model?Xval);
????????error((i-1)*8+j)=mean(double(predict?~=?yval));
????end
end
[eindex]=min(error);
ctmp=floor(index/8);
stmp=rem(index8);
C=cc(ctmp);
sigma=ss(stmp);


%?=========================================================================

end

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1543??2015-12-16?19:12??ex6\dataset3Params.m

?????文件???????2154??2015-12-16?19:38??ex6\emailFeatures.m

?????文件????????393??2013-11-18?21:54??ex6\emailSample1.txt

?????文件???????1301??2013-11-18?21:54??ex6\emailSample2.txt

?????文件???????4128??2013-11-18?21:54??ex6\ex6.m

?????文件????????981??2013-11-18?21:54??ex6\ex6data1.mat

?????文件???????7604??2013-11-18?21:54??ex6\ex6data2.mat

?????文件???????6038??2013-11-18?21:54??ex6\ex6data3.mat

?????文件???????4593??2013-11-18?21:54??ex6\ex6_spam.m

?????文件????????707??2015-12-16?16:57??ex6\gaussianKernel.m

?????文件????????761??2013-11-18?21:54??ex6\getVocabList.m

?????文件???????1624??2015-04-02?16:08??ex6\lib\jsonlab\AUTHORS.txt

?????文件???????3862??2015-04-02?16:08??ex6\lib\jsonlab\ChangeLog.txt

?????文件????????881??2015-04-02?16:08??ex6\lib\jsonlab\jsonopt.m

?????文件???????1551??2015-04-02?16:08??ex6\lib\jsonlab\LICENSE_BSD.txt

?????文件??????18732??2015-04-02?16:08??ex6\lib\jsonlab\loadjson.m

?????文件??????15574??2015-04-02?16:08??ex6\lib\jsonlab\loadubjson.m

?????文件????????771??2015-04-02?16:08??ex6\lib\jsonlab\mergestruct.m

?????文件??????19369??2015-04-02?16:08??ex6\lib\jsonlab\README.txt

?????文件??????17462??2015-04-02?16:08??ex6\lib\jsonlab\savejson.m

?????文件??????16123??2015-04-02?16:08??ex6\lib\jsonlab\saveubjson.m

?????文件???????1094??2015-04-02?16:08??ex6\lib\jsonlab\varargin2struct.m

?????文件???????1195??2015-04-02?16:08??ex6\lib\makeValidFieldName.m

?????文件???????3734??2015-04-02?16:08??ex6\lib\submitWithConfiguration.m

?????文件????????323??2013-11-18?21:54??ex6\linearKernel.m

?????文件????????569??2013-11-18?21:54??ex6\plotData.m

?????文件???????9902??2013-11-18?21:54??ex6\porterStemmer.m

?????文件???????3939??2015-12-16?19:34??ex6\processEmail.m

?????文件????????396??2013-11-18?21:54??ex6\readFile.m

?????文件????????655??2013-11-18?21:54??ex6\spamSample1.txt

............此處省略17個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源