Skip to content

Commit

Permalink
adding to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfm000 committed Nov 29, 2023
1 parent 8cb2634 commit b93b1a2
Show file tree
Hide file tree
Showing 7 changed files with 362 additions and 7 deletions.
335 changes: 335 additions & 0 deletions docs/source/Copulas.rst

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/source/Multivariate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,48 @@ Multivariate Distributions
############################

This SklarPy package contains many different multivariate distributions.
Unlike univariate distribution, these are not wrappers of scipy objects (with the exceptions of mvt_normal and mvt_student_t).
Unlike univariate distributions, these are not wrappers of scipy objects (with the exceptions of mvt_normal and mvt_student_t).

All implemented multivariate distributions are able to be fitted to both multivariate numpy and pandas data and contain easy saving and plotting methods.

What multivariate distributions are implemented?
Which multivariate distributions are implemented?
------------------------------------------------
Currently, the following multivariate distributions are implemented:

.. csv-table:: Multivariate Distributions
:file: mvt_table.csv
:header-rows: 1

All Normal-Mixture models use the parameterization specified by McNeil, Frey and Embrechts (2005).

PreFitContinuousMultivariate
----------------------------
This is the base class for all multivariate distributions. It implements the following methods and attributes:

- logpdf (log of the probability density function)
- pdf (probability density function)
- cdf (cumulative density function)
- mc_cdf (Monte Carlo approximation of the cumulative density function)
- cdf (cumulative distribution function)
- mc_cdf (Monte Carlo approximation of the cumulative distribution function)
- rvs (random variate generator / sampler)
- likelihood (likelihood function)
- loglikelihood (log of the likelihood function)
- aic (Akaike Information Criterion)
- bic (Bayesian Information Criterion)
- marginal_pairplot (pairplot of the marginal distributions)
- pdf_plot (plot of the probability density function)
- cdf_plot (plot of the cumulative density function)
- mc_cdf_plot (plot of the Monte Carlo approximation of the cumulative density function)
- cdf_plot (plot of the cumulative distribution function)
- mc_cdf_plot (plot of the Monte Carlo approximation of the cumulative distribution function)
- num_params (The number of parameters in the distribution)
- num_scalar_params (The number of scalar values across all parameters in the distribution)
- fit (fitting the distribution to data)

mc_cdf is a numerical approximation of the cumulative density function. This is usually necessary for distributions that do not have a closed form cumulative density function, as the numerical integration alternative is computationally expensive.
mc_cdf is a numerical approximation of the cumulative distribution function. This is usually necessary for distributions that do not have a closed form cumulative density function, as the numerical integration alternative is computationally expensive.

num_params is the number of parameter objects in the distribution, i.e. a vector / matrix is counted as 1.
num_scalar_params counts the number of unique scalar values across all parameter objects.

Also note that pdf and cdf plots are only implemented for 2-dimensional distributions.

FittedContinuousMultivariate
----------------------------
This class is the fitted version of PreFitContinuousMultivariate's subclasses.
Expand Down
16 changes: 16 additions & 0 deletions docs/source/copula_table.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Family,Name,Dimensions,SklarPy Model
Normal Mixture,Normal / Gaussian,Multivariate,gaussian_copula
Normal Mixture,Student-T,Multivariate,student_t_copula
Normal Mixture,Skewed-T,Multivariate,skewed_t_copula
Normal Mixture,Generalized Hyperbolic,Multivariate,gh_copula
Normal Mixture,Symmetric Generalized Hyperbolic,Multivariate,sgh_copula
Normal Mixture,Hyperbolic,Multivariate,hyperbolic_copula
Normal Mixture,Symmetric Hyperbolic,Multivariate,shyperbolic_copula
Normal Mixture,Normal-Inverse Gaussian (NIG),Multivariate,nig_copula
Normal Mixture,Symmetric Normal-Inverse Gaussian,Multivariate,snig_copula
Normal Mixture,Marginal Hyperbolic,Multivariate,mh_copula
Normal Mixture,Symmetric Marginal Hyperbolic,Multivariate,smh_copula
Archimedean,Clayton,Multivariate,clayton_copula
Archimedean,Gumbel,Multivariate,gumbel_copula
Archimedean,Frank,Bivariate,frank_copula
Numerical,Gaussian KDE,Multivariate,gaussian_kde_copula
Binary file added media/Copula_PDF_Gh_Copula_PDF_Plot_Plot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/MC_CDF_Gh_MC_CDF_Plot_Plot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/PDF_Gh_PDF_Plot_Plot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/mfitter_pairplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b93b1a2

Please # to comment.