Institut de Robòtica i Informàtica Industrial

GetLargestComponents

PURPOSE ^

Gets the components with the largest weigth.

SYNOPSIS ^

function gmC=GetLargestComponents(gm,m)

DESCRIPTION ^

   Gets the components with the largest weigth.

   Returns a Gaussian mixture formed by the 'm' elements of the
   input mixture with larger weigth.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
  • CompressGR Gaussian mixture compression using the Golberger and Roweis method.

SOURCE CODE ^

0001 function gmC=GetLargestComponents(gm,m)
0002 %   Gets the components with the largest weigth.
0003 %
0004 %   Returns a Gaussian mixture formed by the 'm' elements of the
0005 %   input mixture with larger weigth.
0006 
0007   if gm.n<=m
0008     gmC=gm;
0009   else
0010     [w ndx]=sort(gm.w,2,'descend');
0011     nw=gm.w(ndx(1:m)); 
0012     gmC=GMixture(nw/sum(nw),gm.g(ndx(1:m)));
0013   end


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003