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

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

?? svcm_train.m

?? 本程序主要面向?qū)?shù)據(jù)樣本進(jìn)行計數(shù)的使用者。基于算法
?? M
?? 第 1 頁 / 共 3 頁
字號:
function [a, b, g, inds, inde, indw] = svcm_train(x, y, C);% function [a, b, g, inds, inde, indw] = svcm_train(x, y, C);%        support vector classification machine%        incremental learning, and leave-one-out cross-validation%        soft margin%        uses "kernel.m"%%        x: independent variable, (L,N) with L: number of points; N: dimension%        y: dependent variable, (L,1) containing class labels (-1 or +1)%        C: soft-margin regularization constant%%        a: alpha coefficients (to be multiplied by y)%        b: offset coefficient%        g: derivatives (adding one yields margins for each point)%        inds: indices of support vectors%        inde: indices of error vectors%        indw: indices of wrongly classified leave-one-out vectors%%%%%%%%%% version 1.1; last revised 02/12/2001; send comments to gert@jhu.edu %%%%%%%%%%%%% GLOBAL VARIABLES:global online query terse verbose debug memoryhog visualizeif isempty(online)    online = 0;                       % take data in the order it is presentedendif isempty(query)    query = 0;                        % choose next point based on margin distributionendif isempty(terse)    terse = 0;                        % print out only final resultsendif isempty(verbose)    verbose = 0;                      % print out details of intermediate resultsendif isempty(debug)    debug = 0;                        % use only for debugging; slows it down significantlyendif isempty(memoryhog)    memoryhog = 0;                    % use more memory; good only if kernel dominates computationendif isempty(visualize)    visualize = 0;                    % record and plot trajectory of coeffs. a, g, and leave-one-out gend%%% END GLOBAL VARIABLES[L,N] = size(x);[Ly,Ny] = size(y);if Ly~=L    fprintf('svcm_train error: x and y different number of data points (%g/%g)\n\n', L, Ly);    returnelseif Ny~=1    fprintf('svcm_train error: y not a single variable (%g)\n\n', Ny);    returnelseif any(y~=-1&y~=1)    fprintf('svcm_train error: y takes values different from {-1,+1}\n\n');    returnendeps = 1e-6;        % margin "margin"; for numerical stability when Q is semi-positive definiteeps2 = 2*eps/C;tol = 1e-6;        % tolerance on derivatives at convergence, and their recursive computationfprintf('Support vector soft-margin classifier with incremental learning\n')fprintf('  %g training points\n', L)fprintf('  %g dimensions\n\n', N)keepe = debug|memoryhog;        % store Qe for error vectors as "kernel cache"keepr = debug|memoryhog;        % store Qr for recycled support vectors as "kernel cache"if verbose    terse = 0;    if debug        fprintf('debugging mode (slower, more memory intensive)\n\n')    elseif memoryhog        fprintf('memoryhog active (fewer kernel evaluations, more memory intensive)\n\n')    end    fprintf('kernel used:\n')    help kernel    fprintf('\n')enda = zeros(L,1);                       % coefficients, sparseb = 0;                                % offsetW = 0;                                % energy functiong = -(1+eps)*ones(L,1);               % derivative of energy functioninds = [];                        % indices of support vectors; none initiallyinde = [];                        % indices of error vectors; none initiallyindo = (L:-1:1)';                 % indices of other vectors; all initiallyindr = [];                        % indices of "recycled" other vectors; for memory "caching"indl = [];                        % indices of leave-one-out vectors (still to be) consideredindw = [];                        % indices of wrongly classified leave-one-out vectorsls = length(inds);                % number of support vectors;le = length(inde);                % number of error vectors;la = ls+le;                       % bothlo = length(indo);                % number of other vectors;lr = length(indr);                % number of recycled vectorslw = length(indw);                % number or wrongly classified leave-one-out vectorsprocessed = zeros(L,1);           % keeps track of which points have been processedR = Inf;                          % inverse hessian (a(inds) and b only)Qs = y';                          % extended hessian; (a(inds) plus b, and all vectors)Qe = [];                          % same, for inde ("cache" for Qs)Qr = [];                          % same, for indr ("cache" for Qs)Qc = [];                          % same, for indc (used for gamma and Qs)if visualize                      % for visualization    figure(1)    hold off    clf    axis([-0.1*C, 1.1*C, -1.2, 0.2])    gctraj = [];    figure(2)    hold off    clf    figure(3)    hold off    clfenditer = 0;                         % iteration countmemcount = 0;                     % memory usagekernelcount = 0;                  % kernel computations, counted one "row" (epoch) at a timetraining = 1;                     % first do training recursion ...leaveoneout = 0;                  % ... then do leave-one-out sequence (with retraining)indc = 0;                         % candidate vectorindco = 0;                        % leave-one-out vectorindso = 0;                        % a recycled support vector; used as bufferfree = a(indo)>0|g(indo)<0;       % free, candidate support or error vectorleft = indo(free);                % candidates leftcontinued = any(left);while continued                    % check for remaining free points or leave-one-outs to process        % select candidate indc    indc_prev = indc;    if online & indc_prev>0        if query            processed(indc_prev) = 1;     % record last point in the history log        else            processed(1:indc_prev) = 1;   % record last and all preceding points        end    end    if query%       [gindc, indc] = max(g(left));     % closest to the margin        [gindc, indc] = min(g(left));     % greedy; worst margin        indc = left(indc);    else        indc = left(length(left));        % take top of the stack, "last-in, first-out"    end    % get Qc, row of hessian corresponding to indc (needed for gamma)    if keepr & lr>0 & ...         % check for match among recycled vectors        any(find(indr==indc))            ir = find(indr==indc);                % found, reuse            Qc = Qr(ir,:);            indr = indr([1:ir-1,ir+1:lr]);        % ... remove from indr            Qr = Qr([1:ir-1,ir+1:lr],:);          % ... and Qr            lr = lr-1;    elseif indc==indso            % support vector from previous iteration, leftover in memory        Qc = Qso;    elseif ls>0 & ...             % check for match among support vectors        any(find(inds==indc))            is = find(inds==indc);                % found, reuse            Qc = Qs(is+1,:);    elseif keepe & le>0 & ...     % check for match among stored error vectors        any(find(inde==indc))            ie = find(inde==indc);                % found, reuse            Qc = Qe(ie,:);    elseif indc~=indc_prev        % not (or no longer) available, compute        xc = x(indc,:);        yc = y(indc);        Qc = (yc*y').*kernel(xc,x);        Qc(indc) = Qc(indc)+eps2;        kernelcount = kernelcount+1;    end    % prepare to increment/decrement z = a(indc)' or y(indc)*b, subject to constraints.    % move z up when adding indc ((re-)training), down when removing indc (leave-one-out or g>0)    upc = ~leaveoneout & (g(indc)<=0);    polc = 2*upc-1;               % polarity of increment in z    beta = -R*Qs(:,indc);         % change in [b;a(inds)] per change in a(indc)    if ls>0        % move z = a(indc)'        gamma = Qc'+Qs'*beta;     % change in g(:) per change in z = a(indc)'        z0 = a(indc);             % initial z value        zlim = max(0,C*polc);     % constraint on a(indc)    else % ls==0        % move z = y(indc)*b and keep a(indc) constant; there is no a(:) free to move in inds!        gamma = y(indc)*Qs';      % change in g(:) per change in z = y(indc)*b        z0 = y(indc)*b;           % initial z value        zlim = polc*Inf;          % no constraint on b    end    gammac = gamma(indc);    if gammac<=-tol        fprintf('\nsvcm_train error: gamma(indc) = %g <= 0 (Q not positive definite)\n\n', gammac)    elseif gammac==Inf        fprintf('\nsvcm_train error: gamma(indc) = %g (Q rank deficient)\n\n', gammac)        return    end    % intrinsic limit: g(indc) = 0, where indc becomes support vector    if ~leaveoneout               % only consider when training indc, not when removing indc        zlimc = z0-g(indc)'./gammac;    else                          % leave-indc-out!        zlimc = polc*Inf;    end    % support vector constraints: 0<=a(inds)<=C    zlims = Inf*polc;                            % by default, immaterial    if ls>0        is = find(inds==indc);        if any(is)                               % leave-indc-out, remove from inds            zlims = z0;                          % clamp z; no change to variables        else            betaa = beta(2:ls+1);                % beta terms corresponding to a(inds)  (not b)            void = (betaa==0);                   % void zero betaa values ...            if any(any(~void))                warning off % suppress div. by 0                zlims = z0+(C*(betaa*polc>0)-a(inds))./betaa;                warning on                zlims(void) = polc*Inf;          % ... which don't enter the constraints                [zmins, is] = min(zlims*polc,[],1);                imin = find(zlims==zmins);                if length(imin)>1                    [gmax, imax] = max(abs(betaa(imin)),[],1);                    is = imin(imax);                end                zlims = zmins*polc;              % pick tightest constraint            end        end    end    % error vector constraints: g(inde)<=0    zlime = Inf*polc;                            % by default, immaterial    if le>0        ie = find(inde==indc);        if any(ie)                               % leave-indc-out, remove from inde            zlime = z0;                          % clamp z; no change to variables        else            gammae = gamma(inde);            void = (gammae*polc<0)|(gammae==0);  % void g moving down, or zero gamma...            if any(any(~void))

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品 国产精品| 日韩亚洲欧美成人一区| 日韩在线一二三区| 日本一区二区视频在线观看| 欧美日韩精品久久久| 99久久精品国产精品久久| 欧美日韩视频一区二区| 久久精品99国产精品日本| 亚洲女性喷水在线观看一区| 日韩精品一区二区三区在线播放| 99精品国产99久久久久久白柏| 亚洲欧洲美洲综合色网| 色噜噜偷拍精品综合在线| 欧美综合亚洲图片综合区| 亚洲综合色区另类av| 在线看日韩精品电影| 26uuu久久天堂性欧美| 精品视频色一区| 91丨porny丨蝌蚪视频| 国产成人精品免费在线| 久久99久久99精品免视看婷婷| 亚洲国产成人porn| 亚洲综合一区二区三区| 图片区小说区区亚洲影院| 亚洲国产岛国毛片在线| 久久这里只有精品视频网| 欧美一级免费观看| 欧美日本国产视频| 欧美日韩一卡二卡三卡 | 盗摄精品av一区二区三区| 图片区小说区国产精品视频| 一区二区三区精品久久久| 亚洲三级在线免费| 亚洲女同女同女同女同女同69| 国产精品欧美一区喷水| 中文av一区特黄| 国产精品国产三级国产普通话三级| 国产人成一区二区三区影院| www精品美女久久久tv| 精品伦理精品一区| 亚洲精品一区二区三区影院| 欧美不卡视频一区| 亚洲精品一区二区三区香蕉| 26uuu亚洲综合色| 久久久亚洲午夜电影| 久久久99免费| 国产精品视频麻豆| 1区2区3区国产精品| 亚洲欧美另类小说| 亚洲线精品一区二区三区| 亚洲一二三级电影| 蜜桃久久久久久久| 精品亚洲成a人在线观看| 国产精品1024久久| 9i在线看片成人免费| 日本高清不卡aⅴ免费网站| 欧美伊人久久大香线蕉综合69| 欧美日本一区二区在线观看| 精品日韩成人av| 国产日韩欧美精品一区| 亚洲欧美日韩国产中文在线| 亚洲成av人影院在线观看网| 麻豆91在线观看| 国产不卡视频在线播放| 色综合久久天天| 日韩视频一区二区| 国产精品久久久久久妇女6080| 亚洲激情男女视频| 久久99精品国产.久久久久久| 欧美日韩在线不卡| 日韩一区二区三区视频在线 | 丝袜诱惑制服诱惑色一区在线观看 | 日韩一区二区视频| 欧美tk—视频vk| 中文字幕一区免费在线观看| 亚洲大片在线观看| 国产另类ts人妖一区二区| av不卡在线播放| 91精品国产一区二区三区香蕉| 日韩精品中文字幕一区二区三区 | 中文字幕亚洲精品在线观看| 亚洲成av人片观看| 国产大陆亚洲精品国产| 欧美日韩在线播放| 中文字幕乱码日本亚洲一区二区| 亚洲一区二区视频| 国产福利91精品一区二区三区| 欧美性淫爽ww久久久久无| 国产视频一区不卡| 日产国产高清一区二区三区| 成人午夜激情视频| 欧美一区二区美女| 亚洲精品福利视频网站| 国产又黄又大久久| 欧美美女黄视频| 亚洲视频一二三| 国产在线观看免费一区| 欧美老女人在线| 亚洲日本在线视频观看| 国产一区二区h| 91精品国产欧美一区二区成人 | 一区二区三区成人| 懂色av中文一区二区三区| 日韩一区二区电影网| 亚洲影视在线播放| av激情综合网| 国产日韩欧美激情| 国产最新精品免费| 欧美一级精品在线| 香蕉成人啪国产精品视频综合网| 欧美一卡二卡三卡| 一区二区三区在线不卡| 成人精品视频一区二区三区尤物| 精品欧美一区二区久久| 日韩电影免费一区| 欧美视频在线不卡| 亚洲黄色性网站| 一本一道波多野结衣一区二区| 欧美经典一区二区| 国产高清视频一区| 欧美精品一区二区三区很污很色的 | 亚洲欧美日韩国产一区二区三区| 狠狠久久亚洲欧美| 欧美mv日韩mv亚洲| 男人的天堂久久精品| 欧美日韩成人在线一区| 一区二区三区四区视频精品免费| 99久久精品国产麻豆演员表| 国产精品美女久久久久久久久久久| 国产主播一区二区三区| 久久丝袜美腿综合| 国产精品一区二区黑丝| 久久精品一区二区三区不卡牛牛| 激情五月婷婷综合| www激情久久| 国产传媒久久文化传媒| 中文av一区二区| 91在线视频网址| 一区二区三区在线视频免费 | 555www色欧美视频| 亚洲va国产va欧美va观看| 欧美美女一区二区| 日韩精品一区第一页| 91精品国产乱| 精品一区二区三区久久| 国产日韩欧美不卡在线| 99久久伊人久久99| 亚洲欧美另类综合偷拍| 在线观看欧美黄色| 青青草国产成人99久久| 91精品国模一区二区三区| 久久精品国产99久久6| 国产欧美日韩不卡免费| heyzo一本久久综合| 亚洲午夜羞羞片| 欧美一区二区不卡视频| 国产高清无密码一区二区三区| 中文字幕一区免费在线观看| 在线一区二区三区| 日本三级亚洲精品| 亚洲精品在线电影| av男人天堂一区| 日韩在线观看一区二区| 久久精品一区四区| 欧美专区亚洲专区| 日本欧美一区二区| 久久精品一区二区三区av | 精品日韩一区二区| 99免费精品视频| 日韩av午夜在线观看| 国产情人综合久久777777| 91久久一区二区| 国产原创一区二区三区| 伊人夜夜躁av伊人久久| 精品福利一二区| 色天使色偷偷av一区二区| 欧美bbbbb| 亚洲人123区| 欧美大片一区二区三区| 色哟哟精品一区| 丁香婷婷综合色啪| 偷拍亚洲欧洲综合| 国产精品入口麻豆原神| 911精品产国品一二三产区| 国产成人精品免费网站| 偷拍自拍另类欧美| 日韩毛片视频在线看| 精品欧美一区二区久久| 欧美丝袜丝nylons| 菠萝蜜视频在线观看一区| 日本怡春院一区二区| 亚洲激情自拍视频| 国产欧美一区二区精品仙草咪| 在线不卡a资源高清| eeuss鲁片一区二区三区在线看| 久久国内精品自在自线400部| 亚洲主播在线观看| 亚洲欧洲色图综合| 久久久久国产精品厨房| 91精品国产日韩91久久久久久|