File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Others/DataMining_Viterbi Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments