FittingTest_AICC

FittingTest_AICC(*args)

Compute the Akaike information criterion (with correction for small data).

Refer to Akaike Information Criterion (AIC).

Parameters
sample2-d sequence of float

Tested sample.

modelDistribution or DistributionFactory

Tested distribution.

n_parametersint, 0 \leq k, optional

The number of parameters in the distribution that have been estimated from the sample. This parameter must not be provided if a DistributionFactory was provided as the second argument (it will internally be set to the number of parameters estimated by the DistributionFactory). It can be specified if a Distribution was provided as the second argument, but if it is not, it will be set equal to 0.

Returns
estimatedDistDistribution

Estimated distribution (case factory as argument)

AICCfloat

The Akaike information criterion (corrected).

Notes

This is used for model selection, especially with small data samples. In case we set a factory argument, the method returns both the estimated distribution and AICc value. Otherwise it returns only the AICc value.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> sample = distribution.getSample(30)
>>> ot.FittingTest.AICC(sample, distribution)
2.793869...
>>> ot.FittingTest.AICC(sample, distribution, 2)
2.942017...
>>> fitted_dist, aicc = ot.FittingTest.AICC(sample, ot.NormalFactory())
>>> aicc
2.932204...