19 #ifndef _MLPACK_CORE_DISTRIBUTIONS_GAMMA_DISTRIBUTION_HPP    20 #define _MLPACK_CORE_DISTRIBUTIONS_GAMMA_DISTRIBUTION_HPP    26 namespace distribution {
    94   void Train(
const arma::mat& rdata, 
const double tol = 1e-8);
   107   void Train(
const arma::mat& observations,
   108              const arma::vec& probabilities,
   109              const double tol = 1e-8);
   124   void Train(
const arma::vec& logMeanxVec,
   125              const arma::vec& meanLogxVec,
   126              const arma::vec& meanxVec,
   127              const double tol = 1e-8);
   146                    arma::vec& probabilities) 
const;
   156   double Probability(
double x, 
const size_t dim) 
const;
   177                       arma::vec& logProbabilities) 
const;
   196   double Alpha(
const size_t dim)
 const { 
return alpha[dim]; }
   198   double& 
Alpha(
const size_t dim) { 
return alpha[dim]; }
   201   double Beta(
const size_t dim)
 const { 
return beta[dim]; }
   203   double& 
Beta(
const size_t dim) { 
return beta[dim]; }
   225   inline bool Converged(
const double aOld,
 arma::vec Random() const
This function returns an observation of this distribution. 
 
Linear algebra utility functions, generally performed on matrices or vectors. 
 
double & Alpha(const size_t dim)
Modify the alpha parameter of the given dimension. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
~GammaDistribution()
Destructor. 
 
void LogProbability(const arma::mat &observations, arma::vec &logProbabilities) const
This function returns the logarithm of the probability of a group of observations. 
 
double Alpha(const size_t dim) const
Get the alpha parameter of the given dimension. 
 
void Train(const arma::mat &rdata, const double tol=1e-8)
This function trains (fits distribution parameters) to new data or the dataset the object owns...
 
size_t Dimensionality() const
Get the dimensionality of the distribution. 
 
GammaDistribution(const size_t dimensionality=0)
Construct the Gamma distribution with the given number of dimensions (default 0); each parameter will...
 
double & Beta(const size_t dim)
Modify the beta parameter of the given dimension. 
 
double Beta(const size_t dim) const
Get the beta parameter of the given dimension. 
 
Miscellaneous math random-related routines. 
 
void Probability(const arma::mat &observations, arma::vec &probabilities) const
This function returns the probability of a group of observations. 
 
This class represents the Gamma distribution.