()
| 24 | return M, K, D, pi, A, R, mu, sigma |
| 25 | |
| 26 | def big_init(): |
| 27 | M = 5 |
| 28 | K = 3 |
| 29 | D = 2 |
| 30 | |
| 31 | pi = np.array([1, 0, 0, 0, 0]) # initial state distribution |
| 32 | |
| 33 | A = np.array([ |
| 34 | [0.9, 0.025, 0.025, 0.025, 0.025], |
| 35 | [0.025, 0.9, 0.025, 0.025, 0.025], |
| 36 | [0.025, 0.025, 0.9, 0.025, 0.025], |
| 37 | [0.025, 0.025, 0.025, 0.9, 0.025], |
| 38 | [0.025, 0.025, 0.025, 0.025, 0.9], |
| 39 | ]) # state transition matrix - likes to stay where it is |
| 40 | |
| 41 | R = np.ones((M, K)) / K # mixture proportions |
| 42 | |
| 43 | mu = np.array([ |
| 44 | [[0, 0], [1, 1], [2, 2]], |
| 45 | [[5, 5], [6, 6], [7, 7]], |
| 46 | [[10, 10], [11, 11], [12, 12]], |
| 47 | [[15, 15], [16, 16], [17, 17]], |
| 48 | [[20, 20], [21, 21], [22, 22]], |
| 49 | ]) # M x K x D |
| 50 | |
| 51 | sigma = np.zeros((M, K, D, D)) |
| 52 | for m in range(M): |
| 53 | for k in range(K): |
| 54 | sigma[m,k] = np.eye(D) |
| 55 | return M, K, D, pi, A, R, mu, sigma |
| 56 | |
| 57 | def get_signals(N=20, T=100, init=big_init): |
| 58 | M, K, D, pi, A, R, mu, sigma = init() |
no outgoing calls
no test coverage detected