亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲黄色片在线观看| 欧美私模裸体表演在线观看| 久久先锋影音av鲁色资源网| 国产精品一区二区视频| 国产欧美视频一区二区三区| 成人久久18免费网站麻豆| 欧美激情一二三区| 91片在线免费观看| 视频一区中文字幕国产| 精品美女在线观看| 99久久精品情趣| 亚洲一区二区在线视频| 日韩欧美久久一区| 成人毛片在线观看| 丝袜亚洲另类欧美| 国产清纯白嫩初高生在线观看91| 成人免费毛片aaaaa**| 亚洲国产视频一区二区| 精品三级在线观看| 91在线观看视频| 青青国产91久久久久久| 国产精品麻豆久久久| 在线看日本不卡| 国产综合色在线视频区| 亚洲色欲色欲www| 欧美xxx久久| 色拍拍在线精品视频8848| 蜜臀久久久久久久| 1024成人网色www| 日韩欧美的一区| 欧洲一区二区三区在线| 韩国三级中文字幕hd久久精品| 国产精品成人免费精品自在线观看| 欧美日韩一区二区三区四区| 国产精品99久久久久久久女警| 亚洲狠狠丁香婷婷综合久久久| 欧美草草影院在线视频| 欧美视频你懂的| 成人一区二区三区在线观看| 美女国产一区二区三区| 一区二区三区中文字幕精品精品| 26uuu另类欧美亚洲曰本| 色综合激情五月| 国产成人无遮挡在线视频| 亚洲1区2区3区视频| 亚洲欧美一区二区三区孕妇| 2021久久国产精品不只是精品 | 精品亚洲成a人| 亚洲免费观看高清在线观看| 久久久99精品免费观看不卡| 欧美一级在线观看| 欧美亚洲综合一区| 成人教育av在线| 国模冰冰炮一区二区| 奇米影视在线99精品| 亚洲国产一区二区三区 | 色国产精品一区在线观看| 国产成人精品一区二区三区四区 | 91在线观看高清| 国产丶欧美丶日本不卡视频| 精品写真视频在线观看| 视频一区二区三区在线| 午夜影院在线观看欧美| 亚洲尤物视频在线| 亚洲一二三级电影| 一区二区在线免费| 亚洲裸体在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品毛片高清在线完整版| 国产精品每日更新| 综合av第一页| 夜夜嗨av一区二区三区网页| 国产精品白丝在线| 中文字幕一区二区视频| 亚洲国产成人私人影院tom| 国产精品―色哟哟| 国产精品嫩草99a| 亚洲欧洲精品一区二区三区不卡| 自拍偷拍欧美激情| 亚洲狼人国产精品| 亚洲bdsm女犯bdsm网站| 麻豆成人av在线| 国产乱码精品1区2区3区| 国产精品996| 97久久超碰精品国产| 91久久国产最好的精华液| 欧美伊人久久大香线蕉综合69| 欧美日韩亚洲综合在线| 欧美肥妇bbw| wwwwxxxxx欧美| 国产欧美精品国产国产专区| 国产精品国产三级国产普通话三级 | 国产精品久久久久久久久免费桃花 | 不卡的av在线播放| 色香蕉成人二区免费| 欧美日韩久久一区| 精品久久久久久久久久久久包黑料 | 麻豆91在线观看| 国产91富婆露脸刺激对白| 99久久免费视频.com| 在线精品视频免费播放| 日韩一区国产二区欧美三区| 久久久久久久久久久久久女国产乱| 国产欧美日韩麻豆91| 亚洲天天做日日做天天谢日日欢| 亚洲国产视频在线| 国内精品不卡在线| 91免费观看视频在线| 欧美日韩不卡在线| 国产亚洲一区二区三区四区| 亚洲日本丝袜连裤袜办公室| 五月婷婷色综合| 国产不卡免费视频| 欧美精品aⅴ在线视频| 久久久久亚洲综合| 亚洲成人av在线电影| 国产成人精品亚洲午夜麻豆| 99re热这里只有精品免费视频| 欧美高清视频一二三区| 国产精品嫩草影院av蜜臀| 日本成人在线一区| 成人动漫一区二区在线| 日韩一二三区视频| 亚洲另类色综合网站| 国产成人啪免费观看软件| 欧美丝袜自拍制服另类| 国产嫩草影院久久久久| 五月天一区二区三区| 成人精品国产免费网站| 91精品欧美综合在线观看最新| 国产精品水嫩水嫩| 美国十次综合导航| 在线观看日韩国产| 国产精品久久久爽爽爽麻豆色哟哟| 免费精品视频在线| 欧美日韩黄色一区二区| 亚洲免费观看高清完整版在线观看 | 琪琪久久久久日韩精品| 在线看国产一区二区| 国产精品久久久久久久久晋中| 久久国产精品一区二区| 欧美精品欧美精品系列| 亚洲丝袜自拍清纯另类| 高清在线观看日韩| 久久综合国产精品| 麻豆精品视频在线观看| 精品1区2区3区| 亚洲欧美国产毛片在线| 9l国产精品久久久久麻豆| 久久久www成人免费无遮挡大片| 日韩福利电影在线| 欧美日韩一区二区在线观看视频 | 亚洲18色成人| 欧美亚洲国产一区二区三区va| 国产精品高潮久久久久无| 国产91精品久久久久久久网曝门| 久久久午夜精品| 国产剧情一区二区| 精品国产成人系列| 久久成人久久鬼色| 欧美精品一区二区三区高清aⅴ| 丝袜亚洲另类丝袜在线| 欧美一区日韩一区| 日韩福利视频导航| 日韩欧美国产综合在线一区二区三区| 亚洲成人免费看| 777久久久精品| 美女网站色91| 久久久综合视频| 国产不卡视频一区二区三区| 国产精品天干天干在观线| 99免费精品视频| 亚洲人成精品久久久久久| 91国偷自产一区二区三区成为亚洲经典| 日韩毛片在线免费观看| 在线视频一区二区免费| 肉肉av福利一精品导航| 日韩免费一区二区三区在线播放| 麻豆高清免费国产一区| 国产欧美日韩另类视频免费观看| 成人丝袜高跟foot| 亚洲精品ww久久久久久p站| 欧美在线综合视频| 日韩精品高清不卡| 精品美女被调教视频大全网站| 国产成人啪免费观看软件| 1区2区3区国产精品| 欧美人牲a欧美精品| 国产在线国偷精品免费看| 国产精品色噜噜| 欧美亚洲高清一区| 精品一区中文字幕| 亚洲人妖av一区二区| 欧美日本不卡视频| 国产99精品在线观看| 亚洲国产欧美在线人成| 精品日韩一区二区| 91小视频免费看| 六月婷婷色综合| 亚洲欧美电影院|