yat
0.21pre
|
#include <yat/regression/NegativeBinomial.h>
Public Member Functions | |
double | alpha (void) const |
alpha parameter More... | |
const utility::Matrix & | covariance (void) const |
Covariance of parameters. More... | |
void | fit2 (const utility::MatrixBase &x, const utility::VectorBase &y) |
fit model parameters More... | |
void | fit (const utility::Matrix &X, const utility::VectorBase &y) |
const utility::Vector & | fit_parameters (void) const |
double | predict (const utility::VectorBase &x) const |
Negative Binomial regression models count data from a negative binomial distribution, , for which the mean is is modeled as and the variance where is the dispersion parameter describing how wider the distribution is compared to Poisson; for the models equals Poisson regression.
double theplu::yat::regression::NegativeBinomial::alpha | ( | void | ) | const |
alpha parameter
The alpha parameter describes the dispersion of the data. Greater alpha implies greater dispersion and unity alpha means the model is same as Poisson regression.
const utility::Matrix& theplu::yat::regression::NegativeBinomial::covariance | ( | void | ) | const |
Covariance of parameters.
Covariance matrix is inferred as where is a diagonal matrix with element
|
virtual |
Just kept for back compatibility with yat 0.19. Exactly the same behaviour as for fit2.
Implements theplu::yat::regression::Multivariate.
|
virtual |
fit model parameters
The parameters are tuned to minimise deviation between data and model
Each row in x
represents a sample.
Reimplemented from theplu::yat::regression::Multivariate.
|
virtual |
Implements theplu::yat::regression::Multivariate.
|
virtual |
Predicted value given x. The prediction is calculated as
Implements theplu::yat::regression::Multivariate.