Initial commit for distribution package. Contains Exponential, Laplace, ...

...Normal, and Uniform
Please, feel free to use/ modify anything from
https://code.google.com/p/probab/

thanks, pac++


On Fri, Sep 5, 2014 at 2:42 AM, Dan Kortschak <notifications@github.com>
wrote:

> In dist/exponential.go:
>
> > +	return 6
> > +}
> > +
> > +// Fit sets the parameters of the probability distribution from the
> > +// data samples x with relative weights w.
> > +// If weights is nil, then all the weights are 1.
> > +// If weights is not nil, then the len(weights) must equal len(samples).
> > +func (e *Exponential) Fit(samples, weights []float64) {
> > +	e.FitPrior(samples, weights, nil, nil)
> > +}
> > +
> > +// FitPrior fits the distribution with a set of priors for the sufficient
> > +// statistics. If priorValue and priorWeights both have length 0, no prior is used.
> > +// For the exponential distribution, there is one prior value specifying
> > +// the prior on the sample rate and the number of samples that observed that value.
> > +func (e *Exponential) FitPrior(samples, weights, priorValue, priorWeight []float64) (newPriorValue, newPriorWeight []float64) {
>
> SGTM
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gonum/stat/pull/4/files#r17151859>.
>