1. 07 Aug, 2020 1 commit
    • Chris Jewell's avatar
      Implemented kernel-ised Gibbs sampler · 7adf0699
      Chris Jewell authored
      Changes:
      
      1. Implemented GibbsStep and GibbsKernel classes
      2. Modified mcmc.sample function to use Gibbs sampler
      3. Amended bugs in event_time_mh.py and occult_proposal.py (edge cases where tf.gathers
      were overshooting the bounds of the data stuctures, not apparent on a GPU but raised on
      CPU).
      7adf0699
  2. 01 Aug, 2020 2 commits
  3. 30 Jul, 2020 1 commit
  4. 24 Jul, 2020 1 commit
  5. 22 Jul, 2020 1 commit
    • Chris Jewell's avatar
      Implemented LTLA-level COVID-19 model · 68b27bba
      Chris Jewell authored
      Changes:
      
      1. Replaced 149 UTLAs with 315 LTLAs mixing matrix;
      2. Wrote geometric initialisation for censored event times;
      3. Modified data ingester to take PHE Anonymised Line Listing data.
      68b27bba
  6. 09 Jul, 2020 1 commit
  7. 08 Jul, 2020 1 commit
    • Chris Jewell's avatar
      Added occult inference capability · cad36259
      Chris Jewell authored
      Changes:
      
      1. Added occult Metropolis Hastings update.
      2. Factored out Categorical2 distribution for use by both event time move and occults.
      3. Refactored mcmc.py script for HDF5 output purposes
      4. Apply compression to HDF5 output file.
      cad36259
  8. 05 Jul, 2020 3 commits
  9. 04 Jul, 2020 2 commits
  10. 29 Jun, 2020 1 commit
  11. 28 Jun, 2020 3 commits
  12. 27 Jun, 2020 2 commits
  13. 26 Jun, 2020 2 commits
    • Chris Jewell's avatar
      Changed storage order of events matrix. · 0291aa34
      Chris Jewell authored
      Previously, the Events matrix expected by model.log_prob was ordered
      [T, M, X] where T is the number of timpoints, M is the number of
      meta-populations and X is the number of transitions.  However, it was
      found more convenient to work with [M, T, X] for the purposes of data
      augmentation.  This meant extra tf.transpose calls.
      
      model.log_prob now expects [M, T, X], with any further batch
      dimensions added as outer dimensions.
      0291aa34
    • Chris Jewell's avatar
      Minor formatting changes to mcmc.py · 8f6ef578
      Chris Jewell authored
      8f6ef578
  14. 25 Jun, 2020 1 commit
  15. 24 Jun, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · e72cfe76
      Chris Jewell authored
      1. Formatting -- black style!
      2. After profiling, implemented a better workaround for the
      tfd.Categorical bug.  Replaced with an inherited Categorical2 class,
      with overloaded log_prob function.
      3. Fixed a  bug in EventTimeProposal where tfd.FiniteDiscrete was
      being used on a non-strictly-increasing outcomes vector.
      4. Increased number of meta-populations to 149 to mirror UK UTLA regions.
      e72cfe76
  16. 22 Jun, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · 705ce40b
      Chris Jewell authored
      1. Fixed bug in covid.impl.event_time_mh._reverse_move where Multinomial one_hot tensor wasn't being advanced for the reverse move.  This is a temporary workaround while tf.nn.sparse_softmax_cross_entropy_with_logits is fixed.
      
      2. Batched EventTimesProposal to move multiple meta-populations.
      
      3. Batched _move_events to allow for multiple meta-population updates
      
      4. Refactored covid.impl.event_time_proposal._abscumdiff so we calculate `bound_times` outside the function.  This allows clipping of times proposed outside [0, T] to [0, T], thus avoiding an error in tf.gather_nd in CPU mode.  The output of EventTimesProposal.sample and EventTimesProposal.log_prob might be inconsistent with what we expect, but that's okay as the move gets rejected as an out-of-bounds proposal anyway.
      705ce40b
  17. 20 Jun, 2020 1 commit
  18. 19 Jun, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · 37ed3377
      Chris Jewell authored
      1. Added log_acceptance_probability to kernel results
      2. Added test for XLA sparse_softmax issue.
      37ed3377
  19. 18 Jun, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · ac099f62
      Chris Jewell authored
      1. Edited _move_events to take into account metapopulation selection.
      2. Replace bound_t.ndim with bound_t.shape.rank for TF Graph Mode running.
      3. Revised index calculation in `_abscumdiff`.  Re-wrote test to accommodate.
      4. Code rationalisation in FilteredEventTimesProposal to return a simpler data structure.
      5. Changed dimension of results.extra field to trace `x_star`.
      6. Edited tests in `tests.test_mcmc.py` for new `_abscumdiff` interface.
      ac099f62
  20. 16 Jun, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · c11e821c
      Chris Jewell authored
      1. Wrote wrapper `FilteredEventTimesProposal` for EventTimesProposal to subset metapopulations.  This currently selects just one meta-population, but the plan is to select more.
      2. Moved test fixture to folder inside tests.
      3. Wrote (failing) TestFilteredEventTimesProposal test.
      c11e821c
  21. 12 Jun, 2020 1 commit
  22. 05 Jun, 2020 1 commit
  23. 03 Jun, 2020 1 commit
  24. 01 Jun, 2020 1 commit
  25. 29 May, 2020 1 commit
  26. 24 May, 2020 1 commit
    • Chris Jewell's avatar
      Changes: · a0488186
      Chris Jewell authored
      1. Corrected bug in UncalibratedEventTimesUpdate.one_step, and factored out some propagation functions.
      2. Inserted a tf.cond into event times update step to deal with the case where there is no preceding or next event (e.g. S->E in an SEIR model doesn't have a preceding event).  This has reduced performance, and could possibly be replaced with a NOOP calculation instead.
      3. Removed call to MH_within_Gibbs -- this proved too restrictive when requiring more than one update to a state_part per sweep of the MHwG sampler.
      a0488186
  27. 21 May, 2020 1 commit
  28. 20 May, 2020 1 commit
  29. 19 May, 2020 1 commit
  30. 18 May, 2020 2 commits
  31. 12 May, 2020 1 commit