FuseComponentsPURPOSEFuses a Gaussian mixture into a single Gaussian.
SYNOPSISfunction g=FuseComponents(gm)
DESCRIPTIONFuses a Gaussian mixture into a single Gaussian. Summarizes the information on a Gaussian mixture into a single Gaussian. The mean of the output Gaussian is the weighted mean of the components in the input mixture. The covariance is basically the weighted mean of the covariance of the components but it also take into account the dispersion of the mean of the components. See also @GMixture/Mean, @GMixture/Covariance, CompressGR. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function g=FuseComponents(gm) 0002 % Fuses a Gaussian mixture into a single Gaussian. 0003 % 0004 % Summarizes the information on a Gaussian mixture into a single 0005 % Gaussian. 0006 % The mean of the output Gaussian is the weighted mean of the components 0007 % in the input mixture. 0008 % The covariance is basically the weighted mean of the covariance of the 0009 % components but it also take into account the dispersion of the mean of 0010 % the components. 0011 % 0012 % See also @GMixture/Mean, @GMixture/Covariance, CompressGR. 0013 m=Mean(gm); 0014 S=Covariance(gm); 0015 for i=1:gm.n 0016 v=(get(gm.g{i},'mean')-m); 0017 S=S+gm.w(i)*(v*v'); 0018 end 0019 g=Gaussian(m,S); 0020 |