Fleet  0.0.9
Inference in the LOT
Classes
ReservoirSample.h File Reference

A simple resevoir sampling algorithm. One great disappointment is that this doesn't implement the version where you draw a random unifom for each number and store the lowest. That's such a pretty idea. More...

#include "Errors.h"
#include "TopN.h"
Include dependency graph for ReservoirSample.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ReservoirSample< T >
 
class  PosteriorWeightedReservoirSample< T >
 

Detailed Description

A simple resevoir sampling algorithm. One great disappointment is that this doesn't implement the version where you draw a random unifom for each number and store the lowest. That's such a pretty idea.

Same as ReservoirSample but chooses proportional to h.posterior – using Algorithm A-Chao from wiki. NOTE that with this it is likely important to use some burn-in because otherwise it will start off full of crummy samples.