(N=20, T=100, init=big_init)
| 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() |
| 59 | X = [] |
| 60 | for n in range(N): |
| 61 | x = np.zeros((T, D)) |
| 62 | s = 0 # initial state is 0 since pi[0] = 1 |
| 63 | r = np.random.choice(K, p=R[s]) # choose mixture |
| 64 | x[0] = np.random.multivariate_normal(mu[s][r], sigma[s][r]) |
| 65 | for t in range(1, T): |
| 66 | s = np.random.choice(M, p=A[s]) # choose state |
| 67 | r = np.random.choice(K, p=R[s]) # choose mixture |
| 68 | x[t] = np.random.multivariate_normal(mu[s][r], sigma[s][r]) |
| 69 | X.append(x) |
| 70 | return X |
| 71 | |
| 72 | if __name__ == '__main__': |
| 73 | T = 500 |
no outgoing calls
no test coverage detected