opeltre / topos

Statistics and Topology
MIT License
9 stars 0 forks source link

Gibbs Sampling #24

Open opeltre opened 2 years ago

opeltre commented 2 years ago

Add support for Gibbs sampling:

Given an initial condition x0, sweep on vertices i <- I or a <- K to update local states xi or xa. This is done by local samplers of conditional likelihoods p(xi | x~i) or p(xa | x~a) #23

For large N, the temporal distribution of x converges exponentially quickly to the Gibbs distribution of x.

The initial state could be sampled accross local minima of energy, whenever values conflict at intersections.

opeltre commented 2 years ago

https://fr.wikipedia.org/wiki/%C3%89chantillonnage_de_Gibbs

https://en.wikipedia.org/wiki/Gibbs_sampling

opeltre commented 2 years ago

It might be better to represent E as subset or Dirac measures in Prod_i Ei or Prod_a E_a

Conditioning on energy can then be implemented as sparse matrices

opeltre commented 2 years ago

See https://pytorch.org/docs/stable/distributions.html#categorical to implement local samplers