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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gaussmix.m

?? voice box tool box for matlab
?? M
?? 第 1 頁 / 共 2 頁
字號:
function [m,v,w,g,f,pp,gg]=gaussmix(x,c,l,m0,v0,w0)
%GAUSSMIX fits a gaussian mixture pdf to a set of data observations [m,v,w,g,f]=(x,c,l,m0,v0,w0)
%
% Inputs: n data values, k mixtures, p parameters, l loops
%
%     X(n,p)   Input data vectors, one per row.
%     c(1,p)   Minimum variance (can be a scalar if all components are identical or 0 if no minimum).
%              Use [] to take default value of var(x)/n^2
%     L        The integer portion of l gives a maximum loop count. The fractional portion gives
%              an optional stopping threshold. Iteration will cease if the increase in
%              log likelihood density per data point is less than this value. Thus l=10.001 will
%              stop after 10 iterations or when the increase in log likelihood falls below
%              0.001.
%              As a special case, if L=0, then the first three outputs are omitted.
%              Use [] to take default value of 100.0001
%     M0(k,p)  Initial mixture means, one row per mixture.
%     V0(k,p)  Initial mixture variances, one row per mixture.
%      or V0(p,p,k)  one full-covariance matrix per mixture
%     W0(k,1)  Initial mixture weights, one per mixture. The weights should sum to unity.
%
%     Alternatively, if initial values for M0, V0 and W0 are not given explicitly:
%
%     M0       Number of mixtures required
%     V0       Initialization mode:
%                'f'    Initialize with K randomly selected data points [default]
%                'p'    Initialize with centroids and variances of random partitions
%                'k'    k-means algorithm ('kf' and 'kp' determine initialization of kmeans)
%                'h'    k-harmonic means algorithm ('hf' and 'hp' determine initialization of kmeans)
%                's'    do not scale data during initialization to have equal variances
%                'v'    full covariance matrices
%              Mode 'hf' generally gives the best results but 'f' [the default] is faster
%
% Outputs: (Note that M, V and W are omitted if L==0)
%
%     M(k,p)   Mixture means, one row per mixture. (omitted if L==0)
%     V(k,p)   Mixture variances, one row per mixture. (omitted if L==0)
%       or V(p,p,k) if full covariance matrices in use
%     W(k,1)   Mixture weights, one per mixture. The weights will sum to unity. (omitted if L==0)
%     G       Average log probability of the input data points.
%     F        Fisher's Discriminant measures how well the data divides into classes.
%              It is the ratio of the between-mixture variance to the average mixture variance: a
%              high value means the classes (mixtures) are well separated.
%     PP(n,1)  Log probability of each data point
%     GG(l+1,1) Average log probabilities at the beginning of each iteration and at the end

%  Bugs/Suggestions
%     (2) Allow processing in chunks by outputting/reinputting an array of sufficient statistics
%     (6) Other initialization options:
%              'l'    LBG algorithm
%              'm'    Move-means (dog-rabbit) algorithm

%      Copyright (C) Mike Brookes 2000-2006
%      Version: $Id: gaussmix.m,v 1.14 2009/03/03 08:10:30 dmb Exp $
%
%   VOICEBOX is a MATLAB toolbox for speech processing.
%   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   This program is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
%
%   This program is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You can obtain a copy of the GNU General Public License from
%   http://www.gnu.org/copyleft/gpl.html or by writing to
%   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[n,p]=size(x);
x2=x.^2;            % need x^2 for variance calculation
if isempty(c)
    c=var(x,1)/n^2;
end
if isempty(l)
    l=100+1e-4;
end
if nargin<6             % no initial values specified for m0, v0, w0
    k=m0;
    if n<=k             % each data point can have its own mixture
        m=x(mod((1:k)-1,n)+1,:);    % just include all points several times
        v=zeros(k,p);               % will be set to floor later
        w=zeros(k,1);
        w(1:n)=1/n;
        if l>0
            l=0.1;            % no point in iterating
        end
    else
        if nargin<5
            v0='f';         % default initialization mode
        end
        if any(v0=='s')
            sx=ones(1,p);
            xs=x;
        else
            sx=sqrt(var(x,1));
            sx(sx==0)=1;    % do not divide by zero
            xs=x./sx(ones(n,1),:);
        end
        m=zeros(k,p);
        w=repmat(1/k,k,1);  % all mixtures equally likely
        if any(v0=='k')                     % k-means initialization
            if any(v0=='p')
                [m,e,j]=kmeans(xs,k,'p');
            else
                [m,e,j]=kmeans(xs,k,'f');
            end
        elseif any(v0=='h')                     % k-harmonic means initialization
            if any(v0=='p')
                [m,e,j]=kmeanhar(xs,k,'p');
            else
                [m,e,j]=kmeanhar(xs,k,'f');
            end
        elseif any(v0=='p')                  % Initialize using a random partition
            j=ceil(rand(1,n)*k);       % allocate to random clusters
            j(rnsubset(k,n))=1:k;      % but force at least one point per cluster
            for i=1:k
                m(i,:)=mean(xs(j==i,:),1);
            end
        else                                % Forgy initialization: choose k random points [default]
            m=xs(rnsubset(k,n),:);         % sample k centres without replacement
            [e,j]=kmeans(xs,k,m,0);
        end
        m=m.*sx(ones(k,1),:);               % undo mean scaling
        if any(v0=='v')
            v=zeros(p,p,k);                   % diagonal covariance
            for i=1:k
                ni=sum(j==i);   % number assigned to this centre
                x0=x(j==i,:)-repmat(m(i,:),ni,1);
                v(:,:,i)=(x0'*x0)/ni;
            end
        else
            v=zeros(k,p);                   % diagonal covariance
            for i=1:k
                ni=sum(j==i);   % number assigned to this centre
                v(i,:)=sum((x(j==i,:)-repmat(m(i,:),ni,1)).^2,1)/ni;
            end
        end
    end
else
    k=size(m0,1);
    m=m0;
    v=v0;
    w=w0;
end
fv=(k>1 && (length(size(v))>2)) || (size(v,1))>k; % full covariance matrix
if length(c)>1          % if c is a row vector, turn it into a full matrix so it works with max()
    c=c(ones(k,1),:);
end

% Different sections for full and diagonal covariance matrices

memsize=voicebox('memsize');
if fv
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Full Covariance matrices  %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    pl=p*(p+1)/2;
    lix=1:p^2;
    cix=repmat(1:p,p,1);
    rix=cix';
    lix(cix>rix)=[];                                        % index of lower triangular elements
    cix=cix(lix);                                           % index of lower triangular columns
    rix=rix(lix);                                           % index of lower triangular rows
    dix=find(rix==cix);
    lixi=zeros(p,p);
    lixi(lix)=1:pl;
    lixi=lixi';
    lixi(lix)=1:pl;                                        % reverse index to build full matrices
    v=reshape(v,p^2,k);
    v=v(lix,:)';                                            % lower triangular in rows
    v(:,dix)=max(v(:,dix),c);                                   % force diagonal elements to be >= c

    % If data size is large then do calculations in chunks

    nb=min(n,max(1,floor(memsize/(24*p*k))));    % chunk size for testing data points
    nl=ceil(n/nb);                  % number of chunks
    jx0=n-(nl-1)*nb;                % size of first chunk
    %
    th=(l-floor(l))*n;
    sd=(nargout > 3*(l~=0)); % = 1 if we are outputting log likelihood values
    l=floor(l)+sd;   % extra loop needed to calculate final G value
    %
    lpx=zeros(1,n);             % log probability of each data point
    wk=ones(k,1);
    wp=ones(1,p);

    wpl=ones(1,pl);       % 1 index for lower triangular matrix
    wnb=ones(1,nb);
    wnj=ones(1,jx0);

    % EM loop

    g=0;                           % dummy initial value for comparison
    gg=zeros(l+1,1);
    ss=sd;                       % initialize stopping count (0 or 1)
    vi=zeros(p*k,p);                    % stack of k inverse cov matrices each size p*p
    vim=zeros(p*k,1);                   % stack of k vectors of the form inv(v)*m
    mtk=vim;                             % stack of k vectors of the form m
    vm=zeros(k,1);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品卡一卡二卡三卡四在线| 精品一区二区免费视频| 久久综合久久99| 欧美成人在线直播| 精品国产免费久久| 欧美大黄免费观看| 欧美成人福利视频| 日韩视频在线你懂得| 日韩精品专区在线影院观看| 日韩视频在线观看一区二区| 精品日韩一区二区三区免费视频| 欧美tickle裸体挠脚心vk| 日韩欧美亚洲一区二区| 久久综合狠狠综合久久激情 | 日韩欧美在线网站| 日韩一区二区三区四区| 26uuu精品一区二区| 国产丝袜欧美中文另类| 国产精品丝袜91| 亚洲欧美aⅴ...| 亚洲成av人片一区二区三区 | 91一区二区三区在线观看| 97成人超碰视| 在线观看精品一区| 91精品国产色综合久久ai换脸| 日韩无一区二区| 国产日韩欧美精品电影三级在线| 久久久国产精品午夜一区ai换脸| 亚洲欧洲日韩在线| 亚洲亚洲人成综合网络| 青青草97国产精品免费观看| 精品一区二区三区免费| proumb性欧美在线观看| 欧美在线视频你懂得| 日韩亚洲欧美一区二区三区| 国产日本欧美一区二区| 亚洲精品国产第一综合99久久| 日一区二区三区| 国产成人av资源| 欧美在线一区二区| 久久免费的精品国产v∧| 国产精品短视频| 午夜精品123| 国产精品一区二区果冻传媒| 91久久一区二区| 日韩三级视频在线看| 亚洲视频精选在线| 日本不卡一二三区黄网| www.久久精品| 日韩丝袜情趣美女图片| 亚洲素人一区二区| 欧美aaa在线| 91在线免费看| 日韩美女一区二区三区| 亚洲美女免费视频| 韩国精品久久久| 精品视频一区二区不卡| 国产亚洲精品aa午夜观看| 亚洲国产另类av| 高清在线观看日韩| 91精品婷婷国产综合久久性色| 国产日韩欧美综合在线| 狂野欧美性猛交blacked| 成人精品一区二区三区四区| 在线综合视频播放| 亚洲精品免费在线观看| 国产高清在线观看免费不卡| 欧美另类高清zo欧美| 日韩美女视频一区| 国产一区在线观看视频| 91成人在线精品| 国产精品毛片大码女人| 国产精品自拍在线| 欧美肥妇毛茸茸| 一区二区在线观看不卡| 风间由美一区二区三区在线观看 | 欧美成人性战久久| 亚洲午夜羞羞片| thepron国产精品| 国产性做久久久久久| 久久精品国产99| 在线不卡免费欧美| 夜夜爽夜夜爽精品视频| 福利一区福利二区| 久久亚洲综合色一区二区三区| 亚洲一区二区三区不卡国产欧美| jiyouzz国产精品久久| 精品国产污污免费网站入口 | 欧美老年两性高潮| 亚洲欧美另类小说视频| bt欧美亚洲午夜电影天堂| 国产三级欧美三级| 国产曰批免费观看久久久| 欧美成人官网二区| 久久精品国产999大香线蕉| 91精品国产综合久久精品| 亚洲国产裸拍裸体视频在线观看乱了| 91精彩视频在线| 亚洲欧美激情一区二区| 成人福利在线看| 中文一区一区三区高中清不卡| 国产米奇在线777精品观看| 337p日本欧洲亚洲大胆精品| 久久99热狠狠色一区二区| 日韩欧美成人一区| 久久国产综合精品| 精品国产乱码久久| 国内外精品视频| 久久精品人人做人人综合 | 色综合咪咪久久| 亚洲欧洲日产国码二区| 99久久国产综合精品色伊| 一区在线观看视频| 色综合中文字幕| 亚洲人成网站精品片在线观看| 色88888久久久久久影院野外| 一区二区三区中文字幕电影| 在线精品亚洲一区二区不卡| 亚洲国产另类av| 欧美一区二区观看视频| 激情综合五月天| 国产精品久线在线观看| 91在线视频播放| 性久久久久久久久久久久 | 日韩精品1区2区3区| 日韩三区在线观看| 国产精品一二三在| 中文字幕一区三区| 在线观看一区不卡| 日韩精品一区第一页| 日韩午夜激情av| 成人午夜电影久久影院| 一区二区三区丝袜| 欧美一二三区在线| 欧美丝袜丝nylons| 免费欧美在线视频| 中文字幕第一区综合| 欧美在线一区二区| 久久99精品久久久久久国产越南| 久久久91精品国产一区二区精品 | 国产精品蜜臀av| 欧美日韩久久不卡| 国产福利精品导航| 亚洲一区二区在线视频| 精品久久人人做人人爱| av中文字幕不卡| 日韩和欧美一区二区| 国产欧美一区二区三区在线老狼| 欧洲亚洲国产日韩| 精品无人码麻豆乱码1区2区 | 69成人精品免费视频| 国产风韵犹存在线视精品| 亚洲一区二区三区自拍| 久久日韩精品一区二区五区| 欧美中文字幕亚洲一区二区va在线 | 一区二区三区高清不卡| 日韩免费福利电影在线观看| 色欧美乱欧美15图片| 狠狠久久亚洲欧美| 亚洲人成伊人成综合网小说| 日韩精品中文字幕在线一区| 99re这里只有精品视频首页| 美女视频黄 久久| 亚洲男同1069视频| 日韩精品一区二区三区在线播放 | 在线观看91av| 99热在这里有精品免费| 蜜臀av性久久久久蜜臀aⅴ| 亚洲精品伦理在线| 国产偷国产偷亚洲高清人白洁| 欧美日韩国产精选| 91网站视频在线观看| 精油按摩中文字幕久久| 亚洲一卡二卡三卡四卡五卡| 国产精品免费aⅴ片在线观看| 日韩欧美一级精品久久| 日本韩国欧美三级| 懂色av一区二区三区蜜臀| 蜜臀av亚洲一区中文字幕| 亚洲综合免费观看高清完整版在线 | 日韩免费看的电影| 欧美精品第1页| 91久久奴性调教| 成人激情动漫在线观看| 国产精品一区二区果冻传媒| 乱中年女人伦av一区二区| 国产精品一区二区三区网站| 日日夜夜精品视频免费| 亚洲国产精品一区二区尤物区| 国产精品福利影院| 国产精品青草久久| 久久久国产精华| 精品三级av在线| 欧美电视剧在线观看完整版| 51久久夜色精品国产麻豆| 欧美人牲a欧美精品| 欧美三日本三级三级在线播放| 色婷婷综合久久| 91麻豆精品在线观看| 99久久久久免费精品国产|