Compute the Bayesian information criterion.
sample : 2-d sequence of float
n_parameters : int, , optional
The number of parameters in the distribution that have been estimated from the sample. This parameter must not be provided if a
DistributionFactorywas 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
Distributionwas provided as the second argument, but if it is not, it will be set equal to 0.
BIC : float
The Bayesian information criterion.
The Bayesian information criterion is defined as follows:
where denotes the log-likelihood of the sample with respect to the given distribution, and denotes the number of estimated parameters in the distribution.
This is used for model selection.
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> distribution = ot.Normal() >>> sample = distribution.getSample(30) >>> ot.FittingTest.BIC(sample, distribution) 2.7938693005063415 >>> ot.FittingTest.BIC(sample, distribution, 2) 3.0206157926171517 >>> ot.FittingTest.BIC(sample, ot.NormalFactory()) 3.0108025506670955