autoppl
v0.8
A C++ template library for probabilistic programming
|
Go to the documentation of this file.
23 template <
class MatType>
27 auto delta = x - mean_;
28 mean_ += (1./
static_cast<double>(n_)) * delta;
29 m2n_ += (delta.array() * (x - mean_).array()).matrix();
48 using col_t = std::decay_t<decltype(m_.col(0))>;
const auto & get_variance() const
Definition: welford.hpp:32
void reset()
Definition: welford.hpp:39
WelfordVar(size_t n_params)
Definition: welford.hpp:14
void update(const MatType &x)
Definition: welford.hpp:24
Definition: welford.hpp:13
Definition: bounded.hpp:11
size_t get_n_samples() const
Definition: welford.hpp:33