-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented logarithmic Baum-Welch and unit tested
It produces _almost_ the same results as Emilio Frazzoli's worked example. There are several possible sources of discrepancy. For one, he uses standard probabilities in place of logarithmic ones. He also sets a fixed number of iterations at 20, which I can add as an option.
- Loading branch information
Showing
6 changed files
with
201 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(ns hidden-markov-music.stats-test | ||
(:require [hidden-markov-music.stats :as stats]) | ||
(:use clojure.test)) | ||
|
||
(deftest stochastic-map-test | ||
(testing "random stochastic map is stochastic" | ||
(dotimes [_ 10] | ||
(is (stats/stochastic-map? | ||
(stats/random-stochastic-map [:a :b :c :d :e]))))) | ||
(testing "random row-stochastic map is row-stochastic" | ||
(dotimes [_ 10] | ||
(is (stats/row-stochastic-map? | ||
(stats/random-row-stochastic-map [:a :b :c :d :e] | ||
[:A :B :C :D :E])))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters