⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demlike.m

📁 Matlab 马尔科夫计算工具包
💻 M
字号:
% A demonstration of the HMM software using the 'Likelihood' observation% model. There are K=2 time series where EACH TIME SERIES IS THE % LIKELIHOOD OF THE DATA GIVEN THAT STATE - in effect there is % no observation model; the likelihood of each data point is simply% set to the value of each data point.load demlikefigureplot(pp_t(:,1));title('Original data - series 1');disp('The plot shows the likelihood of data given state/class 1');disp(' ');disp('Press a key to train up an HMM');disp(' ');pauseXseries=pp_t;hmm.K=2;hmm.obsmodel='LIKE';hmm.train.obsupdate=0;hmm.train.init=1;   % We've already initialised (nothing to do anyway)T=size(Xseries,1);% Train HMMhmm=hmmtrain(Xseries,T,hmm);[block,LL]=hmmdecode(Xseries,T,hmm);        % Find most likely hidden state sequence using Viterbi methodfigureplot(block(1).q_star);axis([0 800 0 3]);title('Viterbi decoding');disp('State transition matrix is:');hmm.Pdisp('The Viterbi decoding plot shows that the time series');disp('has been correctly partitioned.');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -