Fit() public method

Fits the underlying distribution to a given set of observations.
public Fit ( double observations, double weights ) : IDistribution
observations double The array of observations to fit the model against.
weights double The weight vector containing the weight for each of the samples.
return IDistribution
Ejemplo n.º 1
0
        public void FitTest()
        {
            PoissonDistribution target = new PoissonDistribution(0);
            double[] observations = { 0.2, 0.7, 1.0, 0.33 };
            
            target.Fit(observations);

            double expected = 0.5575;
            Assert.AreEqual(expected, target.Mean);
        }