vinecopulas.marginals
Created on Thu Feb 22 17:13:20 2024
Functions
|
Fits the best discrete distribution to data. |
|
Fits the best continuous distribution to data. |
|
Compute the pseudo-observations for the given data (transforms data to standard uniform margins) |
|
Compute the pseudo-observations for the given variable that is discrete. |
Module Contents
- vinecopulas.marginals.best_fit_distributiondiscrete(data, bound=False, criterion='BIC')[source]
Fits the best discrete distribution to data.
- Arguments:
data : The data which has to be fit as a 1-d numpy array.
bounds : whether the data is bounded
criterion : Either BIC, AIC or ML is used to choose the best distribution
- Returns:
bestdist : the best distribution and its parameters.
- vinecopulas.marginals.best_fit_distribution(data, criterion='BIC', dists=[])[source]
Fits the best continuous distribution to data.
- Arguments:
data : The data which has to be fit as a 1-d numpy array.
criterion : Either BIC, AIC or ML is used to choose the best distribution
dists : Specify specific distributions if only specific distributions need to be tested, provided as a list.
- Returns:
bestdist : the best distribution and its parameters.
- vinecopulas.marginals.pseudodata(data)[source]
Compute the pseudo-observations for the given data (transforms data to standard uniform margins)
- Arguments:
data : The data which has to be converted into pseudo data, provided as a numpy array where each column contains a separate variable (eg. x1,x2,…,xn)
- Returns:
u : Pseudo data, provided as a numpy array where each column contains a separate variable (eg. u1,u2,…,un)
- vinecopulas.marginals.pseudodiscr(xcdf, xpmf)[source]
Compute the pseudo-observations for the given variable that is discrete.
- Arguments:
xcdf : The cumulative distribution function of the variable, calculated based on the best fit discrete distribution, provided as a 1-d numpy array.
xpmf : The probability mass function of the variable, calculated based on the best fit discrete distribution, provided as a 1-d numpy array.
- Returns:
ui : Pseudo data of a given variable provided as a 1-d numpy array.