FittingTest_BIC

FittingTest_BIC(*args)

Compute the Bayesian information criterion.

Refer to Bayesian Information Criterion (BIC).

Parameters:
sample : 2-d sequence of float

Tested sample.

model : Distribution or DistributionFactory

Tested distribution.

n_parameters : int, 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:
BIC : float

The Bayesian information criterion.

Notes

This is used for model selection.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> sample = distribution.getSample(30)
>>> ot.FittingTest.BIC(sample, distribution)
2.793869...
>>> ot.FittingTest.BIC(sample, distribution, 2)
3.020615...
>>> ot.FittingTest.BIC(sample, ot.NormalFactory())
3.010802...