vinecopulas.marginals ===================== .. py:module:: vinecopulas.marginals .. autoapi-nested-parse:: Created on Thu Feb 22 17:13:20 2024 Functions --------- .. autoapisummary:: vinecopulas.marginals.best_fit_distributiondiscrete vinecopulas.marginals.best_fit_distribution vinecopulas.marginals.pseudodata vinecopulas.marginals.pseudodiscr Module Contents --------------- .. py:function:: best_fit_distributiondiscrete(data, bound=False, criterion='BIC') 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. .. py:function:: best_fit_distribution(data, criterion='BIC', dists=[]) 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. .. py:function:: pseudodata(data) 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) .. py:function:: pseudodiscr(xcdf, xpmf) 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.