We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20302fd commit 2cef388Copy full SHA for 2cef388
1 file changed
Others/DataMining_Viterbi/Client.java
@@ -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