SHARE
TWEET

Untitled

a guest Jun 16th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import tensorflow as tf
  2. import tensorflow_probability as tfp
  3. tfd = tfp.distributions
  4.  
  5. # Generate Particles
  6. tf.random.set_random_seed(rand_seed)
  7. np.random.RandomState(seed=rand_seed)
  8.  
  9. state = np.array(pf['state'])
  10. state.shape = (num_st, )
  11. mvn = tfd.MultivariateNormalFullCovariance(loc=state, covariance_matrix=pf['state_cov'])
  12. particles = sess.run(mvn.sample(pf['Ns']))
  13. pf['particles'] = particles.T
  14. pf['weights'] = np.ones((pf['Ns'], 1))/pf['Ns']
  15. pf['Neff'] = list()
  16. pf['yVec'] = list()
  17. pf['yLow'] = list()
  18. pf['yHigh'] = list()
  19. pf['conf_low'] = 0.15
  20. pf['conf_high'] = 99.85
  21. pf_particles_list = []
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top