Sample `n_samples_per_episode` thetas from a multivariate Gaussian with mean `theta_mean` and covariance `diag(theta_var)`
(self)
| 348 | P["theta_var"] = np.var(D["theta_samples"][top_idxs], axis=0) |
| 349 | |
| 350 | def _sample_thetas(self): |
| 351 | """ |
| 352 | Sample `n_samples_per_episode` thetas from a multivariate Gaussian with |
| 353 | mean `theta_mean` and covariance `diag(theta_var)` |
| 354 | """ |
| 355 | P, N = self.parameters, self.n_samples_per_episode |
| 356 | Mu, Sigma = P["theta_mean"], np.diag(P["theta_var"]) |
| 357 | samples = np.random.multivariate_normal(Mu, Sigma, N) |
| 358 | self.derived_variables["theta_samples"] = samples |
| 359 | |
| 360 | def greedy_policy(self, max_steps, render=True): |
| 361 | """ |