锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合精品成人,亚洲av无码无在线观看红杏,亚洲乱码av中文一区二区http://m.tkk7.com/nianzai/category/52552.htmlzh-cnTue, 11 Sep 2012 19:46:09 GMTTue, 11 Sep 2012 19:46:09 GMT60- 鏈哄櫒瀛︿範:Viterbi(緇寸壒姣?瀹炵幇紼嬪簭http://m.tkk7.com/nianzai/archive/2012/09/07/387259.htmlnianzainianzaiFri, 07 Sep 2012 08:43:00 GMThttp://m.tkk7.com/nianzai/archive/2012/09/07/387259.htmlhttp://m.tkk7.com/nianzai/comments/387259.htmlhttp://m.tkk7.com/nianzai/archive/2012/09/07/387259.html#Feedback0http://m.tkk7.com/nianzai/comments/commentRss/387259.htmlhttp://m.tkk7.com/nianzai/services/trackbacks/387259.htmlhttp://en.wikipedia.org/wiki/Viterbi_algorithm錛夛紝浣嗘槸3涓瀵熷簭鍒椾細鏍囨敞鍑?涓姸鎬佸簭鍒椼?br />涓嬮潰鏈漢鍐欑殑榪欎釜Viterbi(緇寸壒姣?瀹炵幇紼嬪簭灝辨病榪欎釜闂錛?涓瀵熷簭鍒楀氨鍙爣娉ㄥ嚭3涓姸鎬佸簭鍒椼?div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);">
public class Viterbi


{
public static void main(String[] args)

{

String[] states =
{"Rainy", "Sunny"};

String[] observations =
{"walk", "shop", "clean"};

double[] start_probability =
{0.6, 0.4};

double[][] transition_probability =
{
{0.7, 0.3},
{0.4, 0.6}};

double[][] emission_probability =
{
{0.1, 0.4, 0.5},
{0.6, 0.3, 0.1}};
forward_viterbi(observations,states,start_probability,transition_probability,emission_probability);
}
public static void forward_viterbi(String[] observations, String[] states,double[] start_probability, double[][] transition_probability, double[][] emission_probability)

{
int[][] path=new int[observations.length][states.length];
double[][] r=new double[observations.length][states.length];
for(int j=0;j<states.length;j++)

{
r[0][j]=start_probability[j]*emission_probability[j][0];
path[0][j]=0;
}
for(int t=1;t<observations.length;t++)

{
for(int i=0;i<states.length;i++)

{
double tmp=0;int m=0;
for(int j=0;j<states.length;j++)

{
double tem=r[t-1][j]*transition_probability[j][i]*emission_probability[i][t];
if(tem>tmp)

{
tmp=tem;
m=j;
}
}
r[t][i]=tmp;
path[t][i]=m;
}
}
double p=0;int m=0;
for(int i=0;i<r[0].length;i++)

{
if(r[r.length-1][i]>p)

{
p=r[r.length-1][i];
m=i;
}
}
System.out.println("p="+p);
int[] trace=new int[observations.length];
trace[observations.length-1]=m;
for(int t=observations.length-1;t>0;t--)

{
trace[t-1]=path[t][m];
m=path[t][m];
}
for(int i=0;i<trace.length;i++)
System.out.println(states[trace[i]]);
}
}銆?br />

]]>
主站蜘蛛池模板:
日韩免费一级毛片|
亚洲开心婷婷中文字幕|
特黄特色大片免费|
国产AV无码专区亚洲精品|
久久久久av无码免费网|
亚洲AV无码成人精品区狼人影院|
亚洲精品第一国产综合精品99|
国产午夜成人免费看片无遮挡
|
亚洲阿v天堂在线2017免费|
久久精品国产亚洲AV果冻传媒|
久久精品免费一区二区喷潮|
一级大黄美女免费播放|
亚洲欧洲精品在线|
亚洲国产主播精品极品网红
|
亚洲一区精品无码|
91精品国产免费久久久久久青草|
黄色网址免费在线|
亚洲美女自拍视频|
亚洲国产午夜中文字幕精品黄网站|
91九色视频无限观看免费|
十八禁的黄污污免费网站|
亚洲人成人77777在线播放|
国产亚洲精品福利在线无卡一|
成熟女人牲交片免费观看视频
|
亚洲国产综合无码一区二区二三区|
久久aa毛片免费播放嗯啊|
污视频网站免费在线观看|
国产精品亚洲午夜一区二区三区|
亚洲日韩v无码中文字幕|
永久免费av无码网站大全|
182tv免费视视频线路一二三|
一级毛片大全免费播放下载|
亚洲最大中文字幕无码网站|
亚洲AV午夜福利精品一区二区|
免费在线观看污网站|
久久久久久久久免费看无码|
中文字幕免费视频|
国产在线一区二区综合免费视频|
免费看又黄又爽又猛的视频软件|
亚洲综合无码无在线观看|
亚洲欧洲日韩国产|