BestModelKolmogorov¶
- BestModelKolmogorov(sample, distributionCollection)¶
Select the best model according to the Kolmogorov goodness-of-fit test.
- Parameters:
- sample2-d sequence of float
Tested sample.
- modelslist of
Distribution
Tested distributions.
- Returns:
- best_model
Distribution
The distribution that fits the sample best according to the test. This may raise a warning if the best model does not perform well.
- best_result
TestResult
Best test result.
- best_model
See also
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> distribution = ot.Normal() >>> sample = distribution.getSample(30) >>> tested_distributions = [ot.Exponential(), ot.Normal()] >>> best_model, best_result = ot.FittingTest.BestModelKolmogorov(sample, tested_distributions) >>> print(best_model) Normal(mu = 0, sigma = 1)
Examples using the function¶
Select fitted distributions