yat
0.21pre
|
#include <yat/statistics/NegativeBinomialMixture.h>
Public Member Functions | |
void | add (unsigned long int k, unsigned long int n=1) |
const utility::VectorBase & | alpha (void) const |
void | clear (void) |
remove all data | |
void | fit (size_t n) |
void | fit (const utility::VectorBase &m, const utility::VectorBase &alpha, const utility::VectorBase &tau) |
double | logL (void) const |
double | pdf (unsigned long int k) const |
double | pdf (unsigned long int k, size_t i) const |
const utility::VectorBase & | m (void) const |
const utility::VectorBase & | tau (void) const |
Data is modeled as a mixture of negative binomial distributions and the likelihood is calculated as
where .
void theplu::yat::statistics::NegativeBinomialMixture::add | ( | unsigned long int | k, |
unsigned long int | n = 1 |
||
) |
Add n data points with value k
const utility::VectorBase& theplu::yat::statistics::NegativeBinomialMixture::alpha | ( | void | ) | const |
The alpha values are defined as
void theplu::yat::statistics::NegativeBinomialMixture::fit | ( | size_t | n | ) |
Fit the data to a model with n sub-distributions.
void theplu::yat::statistics::NegativeBinomialMixture::fit | ( | const utility::VectorBase & | m, |
const utility::VectorBase & | alpha, | ||
const utility::VectorBase & | tau | ||
) |
Fit the data initiating the search for the optimal model parameters at the values passed.
double theplu::yat::statistics::NegativeBinomialMixture::logL | ( | void | ) | const |
const utility::VectorBase& theplu::yat::statistics::NegativeBinomialMixture::m | ( | void | ) | const |
The mean is calculated as
double theplu::yat::statistics::NegativeBinomialMixture::pdf | ( | unsigned long int | k | ) | const |
Probabily to get k from the inferred model.
double theplu::yat::statistics::NegativeBinomialMixture::pdf | ( | unsigned long int | k, |
size_t | i | ||
) | const |
Probability to get k from the ith model
const utility::VectorBase& theplu::yat::statistics::NegativeBinomialMixture::tau | ( | void | ) | const |