Created
May 11, 2012 16:08
-
-
Save bayerj/2660672 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| X = predicted position | |
| Z = true position | |
| lds = our learned lds on [X, Z] | |
| # Get marginal LDS | |
| marginal_lds = marginal(lds, (7, 8, 9, 10, 11, 12, 13)) # | |
| # Compile a function to calculate hidden state given position predictions. | |
| f = marginal_lds.function(['inpt'], ['filtered_means']) | |
| # Calculate hidden means | |
| h = f(Z) | |
| # Infer true positions from hiddens. | |
| hidden_to_pos = lds.parameters['emission'][:, (0, 1, 2, 3, 4, 5, 6)] | |
| p = np.dot(h, hidden_to_pos) | |
| # plot p and Z. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment