skfolio.distribution.select_univariate_dist#

skfolio.distribution.select_univariate_dist(X, distribution_candidates=None, selection_criterion=AIC)[source]#

Select the optimal univariate distribution estimator based on an information criterion.

For each candidate distribution, the function fits the distribution to X and then computes either the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC). The candidate with the lowest criterion value is returned.

Parameters:
Xarray-like of shape (n_observations, 1)

The input data used to fit each candidate distribution.

distribution_candidateslist of BaseUnivariateDist

A list of candidate distribution estimators. Each candidate must be an instance of a class that inherits from BaseUnivariateDist. If None, defaults to [Gaussian(), StudentT(), JohnsonSU()].

selection_criterionSelectionCriterion, default=SelectionCriterion.AIC
The criterion used for model selection. Possible values are:
  • SelectionCriterion.AIC : Akaike Information Criterion

  • SelectionCriterion.BIC : Bayesian Information Criterion

Returns:
BaseUnivariateDist

The fitted candidate estimator that minimizes the selected information criterion.

Raises:
ValueError

If X does not have exactly one column or if any candidate in the list does not inherit from BaseUnivariateDist.