[mlpack-git] [mlpack/mlpack] GammaDistribution Implementation is Incomplete (#733)

Yannis Mentekidis notifications at github.com
Fri Jul 22 07:57:24 EDT 2016


My GammaDistribution implementation (https://github.com/mlpack/mlpack/pull/729) is incomplete. Here's a summary of what's missing:

 * `Probability(arma::vec&)`: A function that gives the probability of a given observation
 * `LogProbability(arma::vec&)`: A function that gives the log probability of a given observation.
 * `Random()`: Return a gamma-distribution random datapoint.
 * `Train(observations, probabilities)`: A function that fits the observations with given probabilities (sort of like the job done by Train(observations), but weighted).

I implemented this class mainly to have a way to fit a Gamma to observation data, but this should be completed to be usable as an mlpack distribution.

I think the Train(observations, probabilities) could be quite straightforward - the three main statistics needed for the Train(observations) function to work is log(mean(observations)), mean(observations) and mean(log(observations)). If we replace mean(.) with weightedMean(., probabilities), it should work similarly well. I might be wrong on this though.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/733
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160722/acf6bc3f/attachment.html>


More information about the mlpack-git mailing list