LBG算法K-means


LBG算法,矢量量化。Linde,Buzo和Gray于1980年提出LBG算法,又称为K-means算法。该算法是基于最近邻原则把训练矢量分配到与它欧式距离最小的码字的簇中。
资源截图
代码片段和文件信息
function D = dist1(xt);
% dist1 : calculate a nt*nx vector containing distances between all points
%   in x and all points in t. x and t must be row vectors !
%         Used in sqrDist
% D = dist1(xt)
% xt - row vectors
% D - the nt*nx result

% Copyright (c) 1995-2001 Frank Dellaert
% All rights Reserved

global dist1_warning
if isempty(dist1_warning)
   warning(‘dist1: please compile mex-version by typing “mex dist1.c“ in “clusters“ directory‘);
   dist1_warning=1;
end

[dxnx] = size(x);
[dtnt] = size(t);
if (dx~=1 | dt~=1) error(‘dist1 only takes row vectors‘); end

% totally vectorized (but memory hungry)
D = x(ones(1nt):) - t(ones(1nx):)‘;



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2006-08-21 21:10  LBG

     文件        665  2006-07-21 10:24  LBGdist1.m

     文件       2619  2006-08-21 20:00  LBGkmeans_16D.m

     文件      65720  2006-08-20 10:15  LBGlena_tv.mat

     文件         89  2006-09-01 21:50  LBG
ead me.txt

     文件       1161  2006-07-21 10:24  LBGsqrDist.m

     文件    1239075  2002-07-27 16:42  LBGAn Algorithm for Vector Quantizer Design(LBG).pdf

----------- ---------  ---------- -----  ----

              1309329                    7


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)