function hparm=init_hmm(data,NSTATES,NMODES,featnames,min_std);
% function hparm=init_hmm(data,NSTATES,NMODES,featnames,min_std);
% data: data used to initialize gaussian mixtures
% NSTATES: number of states
% NMODES: number of gaussian modes
% featnames = cell array of feature dimension names
% min_std : see doc.
%
% The default HMM has uniform prior state probabilities
% and uniform state transition probabilites.
%
%  Dr. Paul M Baggenstoss
%  NUWC, Newport, RI
%  p.m.baggenstoss@ieee.org
%

%
% NAVAL UNDERSEA WARFARE CENTER
% class-specific@npt.nuwc.navy.mil
% http://www.npt.nuwc.navy.mil/csf
% Paul M. Baggenstoss
% 401-832-8240
% Do not disseminate.
%

if(nargin<4), featnames={}; end;
if(nargin<5), min_std=[]; end;


% Initialize HMM parameters
hparm.N = NSTATES;
hparm.Pi = ones(NSTATES,1) / NSTATES;
hparm.A = ones(NSTATES) / NSTATES;
for i = 1:NSTATES
    hparm.pdf(i)= init_gmix(data, NMODES, featnames, min_std);
end


