資源簡介
MATLAB編寫的學習隱馬爾科夫模型的程序

代碼片段和文件信息
function?[converged?decrease]?=?em_converged(loglik?previous_loglik?threshold?check_increased)
%?EM_CONVERGED?Has?EM?converged?
%?[converged?decrease]?=?em_converged(loglik?previous_loglik?threshold)
%
%?From?the?MIT-toolbox?by?Kevin?Murphy?2003.
%
%?We?have?converged?if?the?slope?of?the?log-likelihood?function?falls?below?‘threshold‘?
%?i.e.?|f(t)?-?f(t-1)|?/?avg?%?where?avg?=?(|f(t)|?+?|f(t-1)|)/2?and?f(t)?is?log?lik?at?iteration?t.
%?‘threshold‘?defaults?to?1e-4.
%
%?This?stopping?criterion?is?from?Numerical?Recipes?in?C?p423
%
%?If?we?are?doing?MAP?estimation?(using?priors)?the?likelihood?can?decrase
%?even?though?the?mode?of?the?posterior?is?increasing.
if?nargin?3?threshold?=?1e-4;?end
if?nargin?4?check_increased?=?1;?end
converged?=?0;
decrease?=?0;
if?check_increased
??if?loglik?-?previous_loglik?-1e-3?%?allow?for?a?little?imprecision
????fprintf(1?‘******likelihood?decreased?from?%6.4f?to?%6.4f!\n‘?previous_loglik?loglik);
????decrease?=?1;
converged?=?0;
return;
??end
end
delta_loglik?=?abs(loglik?-?previous_loglik);
avg_loglik?=?(abs(loglik)?+?abs(previous_loglik)?+?eps)/2;
if?(delta_loglik?/?avg_loglik)?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-09-11?09:00??隱馬爾科夫模型程序范例\
?????文件??????????55??2018-08-27?11:33??隱馬爾科夫模型程序范例\【源碼使用必讀】.url
?????目錄???????????0??2018-09-11?08:59??隱馬爾科夫模型程序范例\mendelHMM\
?????文件????????1205??2003-06-28?16:36??隱馬爾科夫模型程序范例\mendelHMM\em_converged.m
?????文件????????5975??2003-07-02?21:00??隱馬爾科夫模型程序范例\mendelHMM\fwdback.m
?????文件????????4012??2004-01-16?14:07??隱馬爾科夫模型程序范例\mendelHMM\gen_HMM_em.m
?????文件?????????691??2003-06-30?10:20??隱馬爾科夫模型程序范例\mendelHMM\HMM_logprob.m
?????文件????????3618??2004-05-03?21:41??隱馬爾科夫模型程序范例\mendelHMM\init_diagonal.m
?????文件????????1715??2004-01-23?11:40??隱馬爾科夫模型程序范例\mendelHMM\init_grid.m
?????文件????????1390??2004-05-04?16:45??隱馬爾科夫模型程序范例\mendelHMM\init_random.m
?????文件???????48064??2004-01-16?14:32??隱馬爾科夫模型程序范例\mendelHMM\mendelHMM.fig
?????文件???????18892??2004-05-04?16:35??隱馬爾科夫模型程序范例\mendelHMM\mendelHMM.m
?????文件?????????835??2003-06-28?16:39??隱馬爾科夫模型程序范例\mendelHMM\mk_stochastic.m
?????文件?????????591??2003-06-28?16:39??隱馬爾科夫模型程序范例\mendelHMM\multinomial_prob.m
?????文件?????????708??2003-06-28?16:40??隱馬爾科夫模型程序范例\mendelHMM\normalise.m
?????文件????????4526??2002-12-29?13:18??隱馬爾科夫模型程序范例\mendelHMM\process_options.m
?????文件????????1246??2004-01-24?18:25??隱馬爾科夫模型程序范例\mendelHMM\readme.txt
?????文件????????2463??2004-01-23?11:51??隱馬爾科夫模型程序范例\mendelHMM\resample_mendeldata.m
?????文件?????????979??2004-01-23?11:52??隱馬爾科夫模型程序范例\mendelHMM\sample_discr.m
?????文件????????1658??2004-01-23?11:53??隱馬爾科夫模型程序范例\mendelHMM\sample_HMM.m
?????文件?????????669??2004-01-23?11:54??隱馬爾科夫模型程序范例\mendelHMM\sample_MC.m
?????文件????????1114??2004-01-23?11:55??隱馬爾科夫模型程序范例\mendelHMM\set_diploidmode.m
?????文件????????1496??2004-01-23?11:56??隱馬爾科夫模型程序范例\mendelHMM\set_tetraploidmode.m
?????文件????????1731??2004-01-23?11:56??隱馬爾科夫模型程序范例\mendelHMM\view_dataseq.m
?????文件????????4257??2004-05-03?20:48??隱馬爾科夫模型程序范例\mendelHMM\view_mendeldata.m
?????文件????????1288??2004-05-04?16:33??隱馬爾科夫模型程序范例\mendelHMM\view_sampleddata.m
?????文件????????1646??2003-07-29?20:14??隱馬爾科夫模型程序范例\mendelHMM\viterbi_path.m
評論
共有 條評論