亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? svmtest.m

?? 這個大家應(yīng)該很熟悉了吧,很好支持向量機(jī)工具箱,matlab編寫,歡迎大家下載!
?? M
字號:
function [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= SVMTest(Samples, Labels, AlphaY, SVs, Bias,Parameters, nSV, nLabel)
% Usages:
%  [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= SVMTest(Samples, Labels, AlphaY, SVs, Bias)
%  [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= SVMTest(Samples, Labels, AlphaY, SVs, Bias, Parameters)
%     Note that the above two formats are only valid for 2-class problem, it is implemented here to make this version 
%      to be compatabible with the previous version of OSU SVM ToolBox.
%  [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= SVMTest(Samples, Labels, AlphaY, SVs, Bias, Parameters, nSV, nLabel)
%
% DESCRIPTION:
%    Test the performance of a trained SVM classifier by a group of input patterns
%    with their true class labels given.
%    In fact, this function is used to do the input parameter checking, and it 
%    depends on a mex file, mexSVMClass, to implement the algorithm.
%
% Inputs:
%    Samples    - testing samples, MxN, (a row of column vectors);
%    Labels     - labels of testing samples, 1xN, (a row vector);
%    AlphaY    - Alpha * Y, where Alpha is the non-zero Lagrange Coefficients, and
%                    Y is the corresponding Labels, (L-1) x sum(nSV);
%                All the AlphaYs are organized as follows: (pretty fuzzy !)
%      				classifier between class i and j: coefficients with
%			  	         i are in AlphaY(j-1, start_Pos_of_i:(start_Pos_of_i+1)-1),
%				         j are in AlphaY(i, start_Pos_of_j:(start_Pos_of_j+1)-1)
%    SVs       - Support Vectors. (Sample corresponding the non-zero Alpha), M x sum(nSV),
%                All the SVs are stored in the format as follows:
%                 [SVs from Class 1, SVs from Class 2, ... SVs from Class L];
%    Bias      - Bias of all the 2-class classifier(s), 1 x L*(L-1)/2;
%    Parameters - the paramters required by the training algorithm (a <=11-element row vector);
%     +------------------------------------------------------------------
%     |Kernel Type| Degree | Gamma | Coefficient | C |Cache size|epsilon| 
%     +------------------------------------------------------------------
%       ----------------------------------------------+
%       | SVM type | nu | loss toleration | shrinking |
%       ----------------------------------------------+
%            where Kernel Type: (default: 2) 
%                     0 --- Linear
%                     1 --- Polynomial: (Gamma*<X(:,i),X(:,j)>+Coefficient)^Degree
%                     2 --- RBF: (exp(-Gamma*|X(:,i)-X(:,j)|^2)) 
%                     3 --- Sigmoid: tanh(Gamma*<X(:,i),X(:,j)>+Coefficient)
%                  Degree: default 3
%                  Gamma: If the input value is zero, Gamma will be set defautly as
%                         1/(max_pattern_dimension) in the function. If the input
%                         value is non-zero, Gamma will remain unchanged in the 
%                         function. (default: 0 or 1/M)
%                  Coefficient: default 0
%                  C: Cost of constrain violation for C-SVC, epsilon-SVR, and nu-SVR (default 1)
%                  Cache Size: Space to hold the elements of K(<X(:,i),X(:,j)>) matrix (default 40MB)
%                  epsilon: tolerance of termination criterion (default: 0.001)
%                  SVM Type: (default: 0)
%                     0 --- c-SVC 
%                     1 --- nu-SVC
%                     2 --- one-class SVM
%                     3 --- epsilon-SVR 
%                     4 --- nu-SVR
%                  nu: nu of nu-SVC, one-class SVM, and nu-SVR (default: 0.5)
%                  loss tolerance: epsilon in loss function of epsilon-SVR (default: 0.1)
%                  shrinking: whether to use the shrinking heuristics, 0 or 1 (default: 1)
%    nSV       -  numbers of SVs in each class, 1xL;
%    nLabel    -  Labels of each class, 1xL.
%
% Outputs:  
%    ClassRate      -  Classification rate, 1x1;
%    DecisionValue  -  the output of the decision function (only meaningful for 2-class problem), 1xN;
%    Ns             -  number of samples in each class, 1x(L+1), or 1xL;
%                       Note that the last element is for the Samples that are not in any
%                         classes in the training set.
%    ConfMatrix     -  Confusion Matrix, (L+1)x(L+1), or LxL, where ConfMatrix(i,j) = P(X in j| X in i);
%                       Note that when (L+1)x(L+1), the last row and the last column are for the Samples 
%                       that are not in any classes in the training set.
%    PreLabels      -  Predicated Labels, 1xN. 
%
% By Junshui Ma, and Yi Zhao (02/15/2002)
%

if (nargin < 5 | nargin > 8)
   disp(' Error: Incorrect number of input variables.');
   help SVMTest;
   return
end

[minLabel, I]=min(Labels);
[maxLabel, I]=max(Labels);
if ((minLabel ~= -1) | (maxLabel ~= 1))
    if (nargin < 8)
        disp(' Error: The sample labels are not in {-1,1}, However, you need to input ''nLabel'' to support speical labels.');
        return
    end
end
    

if (nargin >= 6) 
    [prM prN]= size(Parameters);
    if (prM ~= 1 & prN~=1)
        disp(' Error: ''Parameters'' should be a row vector.');
        return
    elseif (prM~= 1)
        Parameters = Parameters';
        [prM prN]= size(Parameters);
    end
    if (Parameters(1)>3) & (Parameters(1) < 0)
        disp(' Error: this program only supports 4 types of kernel functions.');
        return
    end
    if (prN >=8)
        if (Parameters(8)>4) & (Parameters(8) <0)
           disp(' Error: this program only supports 5 types of SVMs.');
           return
        end
    end
end



[alM alN] = size(AlphaY);
if (nargin <= 6)  
    [r c] = size(Bias);
    if (r~=1 | c~=1)
        disp(' Error: Your SVM classifier seems a multiclass classifier. However, you need to input ''nSV'' and ''nLabel'' to support multiclass problem.');
        return
    end    
    if (alM > 1)
        disp(' Error: Your SVM classifier seems a multiclass classifier. However, you need to input ''nSV'' and ''nLabel'' to support multiclass problem.');
        return
    end 
end

[spM spN]=size(Samples);
[svM svN]=size(SVs);

if svM ~= spM
   disp(' Error: ''SVs'' should have the same feature dimension as ''Samples''.');
   return;
end

if svN ~= alN
   disp(' Error: number of ''SVs'' should be the same as the colmun number of ''AlphaY''.');
   return;
end


% call the mex file
if (nargin == 5)
    [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= mexSVMClass(Samples, Labels, AlphaY, SVs, Bias);
elseif (nargin == 6)
    [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= mexSVMClass(Samples, Labels, AlphaY, SVs, Bias,Parameters);
elseif (nargin == 8)
    [ClassRate, DecisionValue, Ns, ConfMatrix, PreLabels]= mexSVMClass(Samples, Labels, AlphaY, SVs, Bias,Parameters, nSV, nLabel);
end

% if these is no extra class in the testing samples, 
% remove that last column and row in ConfMatrix
if (ConfMatrix(end, end) == 1) 
    ConfMatrix = ConfMatrix(1:end-1,1:end-1);
    Ns = Ns(1:end-1);
end

 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产综合在线| 成人av在线资源网站| 国产精品18久久久久久vr| 色欧美日韩亚洲| 欧美激情资源网| 免费一级欧美片在线观看| 欧美视频在线一区二区三区 | 国产午夜精品福利| 日韩制服丝袜av| jlzzjlzz亚洲日本少妇| 日韩精品中文字幕一区| 亚洲电影在线免费观看| 99re成人精品视频| 中文av一区特黄| 狠狠色丁香婷婷综合久久片| 日韩一区二区三区精品视频| 亚洲在线一区二区三区| 不卡av在线网| 国产精品毛片高清在线完整版| 蜜桃视频一区二区| 日韩一级欧美一级| 视频一区欧美日韩| 欧美私人免费视频| 一区二区三区中文字幕电影 | 精品中文字幕一区二区| 欧美日韩一区二区三区在线看| 亚洲免费电影在线| 色综合天天在线| 日韩理论在线观看| 91丨九色丨尤物| 亚洲免费观看高清| 日本韩国欧美国产| 午夜免费久久看| 欧美精品丝袜久久久中文字幕| 亚洲一区中文在线| 欧美日韩久久不卡| 亚洲一区二三区| 7777精品伊人久久久大香线蕉经典版下载 | 欧美精品123区| 爽好久久久欧美精品| 欧美一级理论片| 国产中文字幕一区| 久久久久国产一区二区三区四区| 国产精品66部| 亚洲日本在线a| 在线观看一区二区视频| 午夜精品久久久久| 日韩欧美三级在线| 高清免费成人av| 综合激情成人伊人| 欧美精品久久99久久在免费线| 男人的j进女人的j一区| 欧美精品一区二区三区蜜臀| 国产福利一区二区三区视频| 国产精品久久久久久久久图文区| 91欧美激情一区二区三区成人| 亚洲国产婷婷综合在线精品| 日韩午夜在线观看| 国产成人一区二区精品非洲| 亚洲日本va午夜在线影院| 欧美午夜精品一区| 久久爱www久久做| 亚洲三级久久久| 日韩午夜在线观看视频| 成人激情校园春色| 视频一区二区三区中文字幕| 精品久久久久久久久久久院品网 | 久久久不卡网国产精品二区| 91无套直看片红桃| 蜜臀av一区二区| 1区2区3区欧美| 欧美一级艳片视频免费观看| av一区二区三区在线| 欧美aaaaaa午夜精品| 亚洲人成精品久久久久| 欧美一区二区三区色| 99精品国产91久久久久久| 美女诱惑一区二区| 国产精品午夜春色av| 欧美一级专区免费大片| 99re热这里只有精品免费视频| 久久国产综合精品| 亚洲伊人伊色伊影伊综合网| 欧美激情中文字幕一区二区| 日韩欧美色综合| 欧美午夜精品免费| 99re视频精品| 粉嫩一区二区三区在线看| 日韩在线一区二区| 亚洲精品视频免费看| 国产午夜精品一区二区三区嫩草 | 午夜伦欧美伦电影理论片| 中文字幕av一区二区三区| 日韩欧美一区二区三区在线| 欧美三日本三级三级在线播放| 国产精品一区二区三区乱码| 免费高清在线一区| 亚洲一区二区三区三| 国产精品日韩成人| 久久女同精品一区二区| 欧美精品一级二级| 欧美日韩国产另类不卡| 色乱码一区二区三区88| 色综合久久综合中文综合网| 成人美女视频在线看| 高清成人在线观看| 国产精品综合av一区二区国产馆| 精品一区二区在线看| 青青草国产精品亚洲专区无| 日日摸夜夜添夜夜添国产精品| 亚洲一区二区视频在线| 亚洲一本大道在线| 亚洲一区日韩精品中文字幕| 亚洲国产日韩a在线播放| 一区二区三区丝袜| 亚洲在线视频一区| 亚洲成人av中文| 午夜精品久久久久| 蜜臀av在线播放一区二区三区| 日本不卡免费在线视频| 日本一区中文字幕| 国精产品一区一区三区mba视频 | 亚洲va在线va天堂| 日韩制服丝袜先锋影音| 久久99精品国产.久久久久| 国内成人免费视频| av午夜精品一区二区三区| 99精品偷自拍| 精品视频一区 二区 三区| 欧美二区三区的天堂| 日韩一区二区三| 国产亚洲va综合人人澡精品| 国产精品麻豆久久久| 亚洲精品免费在线播放| 视频一区视频二区在线观看| 激情综合亚洲精品| 成人av在线网| 欧美日韩成人综合在线一区二区| 欧美一区二区成人| 国产三级精品视频| 亚洲欧美日韩国产综合在线| 午夜精品在线视频一区| 国产资源精品在线观看| 成人精品国产福利| 欧美日韩国产在线观看| 久久免费国产精品| 亚洲免费伊人电影| 极品销魂美女一区二区三区| 91浏览器打开| 欧美一区二区三区在线看| 中文无字幕一区二区三区| 亚洲18女电影在线观看| 国产精品一区二区免费不卡 | 精品va天堂亚洲国产| 中文字幕一区在线观看视频| 日韩精品1区2区3区| 成人激情视频网站| 欧美一区二区高清| 亚洲男人的天堂av| 久久精品国产澳门| 日本高清免费不卡视频| 2023国产一二三区日本精品2022| 亚洲日本在线a| 国产一区日韩二区欧美三区| 欧美在线一二三| 久久久精品免费免费| 五月激情综合网| 色噜噜狠狠一区二区三区果冻| 26uuu精品一区二区在线观看| 亚洲成人福利片| av成人动漫在线观看| 欧美精品一区二区三区高清aⅴ | 专区另类欧美日韩| 国内精品国产三级国产a久久| 欧美视频在线播放| 亚洲欧美一区二区在线观看| 国产一区二区中文字幕| 69成人精品免费视频| 一区二区三区中文字幕电影| eeuss鲁一区二区三区| 精品黑人一区二区三区久久| 五月天一区二区三区| 91免费国产在线观看| 中文字幕乱码一区二区免费| 精品在线观看视频| 欧美一级国产精品| 亚洲chinese男男1069| 在线视频你懂得一区二区三区| 中文字幕欧美国产| 成人国产精品视频| 国产精品久久福利| 不卡在线观看av| 国产精品成人免费| 大尺度一区二区| 国产精品视频一二| 成人高清免费观看| 1024精品合集| 91黄色在线观看| 亚洲与欧洲av电影| 欧美日韩国产小视频|