<p>My GammaDistribution implementation (<a href="https://github.com/mlpack/mlpack/pull/729" class="issue-link js-issue-link" data-url="https://github.com/mlpack/mlpack/issues/729" data-id="166554953" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#729</a>) is incomplete. Here's a summary of what's missing:</p>

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

<p>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.</p>

<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/issues/733">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFJ0NyKd16uL7CP8dWO5AaRYFg4srks5qYLAkgaJpZM4JSsSE">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEm901_G-IYXY58jIWGfMt9osdRBks5qYLAkgaJpZM4JSsSE.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/733"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>