1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#ifndef COLLAPSED_GIBBS_SAMPLER_HPP
#define COLLAPSED_GIBBS_SAMPLER_HPP
#include <unordered_map>
#include <functional>
#include "tbb/atomic.h"
#include "tbb/task_scheduler_init.h"
#include "SalmonOpts.hpp"
#include "cuckoohash_map.hh"
#include "Eigen/Dense"
class BootstrapWriter;
class CollapsedGibbsSampler {
public:
using VecType = std::vector<double>;
CollapsedGibbsSampler();
template <typename ExpT>
bool sample(ExpT& readExp,
SalmonOpts& sopt,
std::function<bool(const std::vector<int>&)>& writeBootstrap,
uint32_t numSamples = 500);
};
#endif // COLLAPSED_EM_OPTIMIZER_HPP
|