Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2cef388

Browse files
author
linyiqun
committed
维特比算法场景测试类
维特比算法场景测试类
1 parent 20302fd commit 2cef388

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package DataMining_Viterbi;
2+
3+
/**
4+
* 维特比算法
5+
*
6+
* @author lyq
7+
*
8+
*/
9+
public class Client {
10+
public static void main(String[] args) {
11+
// 状态转移概率矩阵路径
12+
String stmFilePath;
13+
// 混淆矩阵路径
14+
String cfFilePath;
15+
// 观察到的状态
16+
String[] observeStates;
17+
// 初始状态
18+
double[] initStatePro;
19+
ViterbiTool tool;
20+
21+
stmFilePath = "C:\\Users\\lyq\\Desktop\\icon\\stmatrix.txt";
22+
cfFilePath = "C:\\Users\\lyq\\Desktop\\icon\\humidity-matrix.txt";
23+
24+
initStatePro = new double[] { 0.63, 0.17, 0.20 };
25+
observeStates = new String[] { "Dry", "Damp", "Soggy" };
26+
27+
tool = new ViterbiTool(stmFilePath, cfFilePath, initStatePro,
28+
observeStates);
29+
tool.calHMMObserve();
30+
}
31+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /