climb.tool.impl.data_suite.third_party.copulas package¶
Subpackages¶
- climb.tool.impl.data_suite.third_party.copulas.bivariate package
- Submodules
- climb.tool.impl.data_suite.third_party.copulas.bivariate.base module
BivariateBivariate.copula_typeBivariate._subclassesBivariate.theta_intervalBivariate.invalid_thetasBivariate.tauBivariate.thetaBivariate.cdf()Bivariate.check_fit()Bivariate.check_marginal()Bivariate.check_theta()Bivariate.compute_theta()Bivariate.copula_typeBivariate.cumulative_distribution()Bivariate.fit()Bivariate.from_dict()Bivariate.generator()Bivariate.infer()Bivariate.invalid_thetasBivariate.load()Bivariate.log_probability_density()Bivariate.partial_derivative()Bivariate.partial_derivative_scalar()Bivariate.pdf()Bivariate.percent_point()Bivariate.ppf()Bivariate.probability_density()Bivariate.sample()Bivariate.save()Bivariate.select_copula()Bivariate.subclasses()Bivariate.tauBivariate.thetaBivariate.theta_intervalBivariate.to_dict()
CopulaTypes
- climb.tool.impl.data_suite.third_party.copulas.bivariate.clayton module
- climb.tool.impl.data_suite.third_party.copulas.bivariate.frank module
- climb.tool.impl.data_suite.third_party.copulas.bivariate.gumbel module
- climb.tool.impl.data_suite.third_party.copulas.bivariate.independence module
- climb.tool.impl.data_suite.third_party.copulas.bivariate.utils module
- Module contents
BivariateBivariate.copula_typeBivariate._subclassesBivariate.theta_intervalBivariate.invalid_thetasBivariate.tauBivariate.thetaBivariate.cdf()Bivariate.check_fit()Bivariate.check_marginal()Bivariate.check_theta()Bivariate.compute_theta()Bivariate.copula_typeBivariate.cumulative_distribution()Bivariate.fit()Bivariate.from_dict()Bivariate.generator()Bivariate.infer()Bivariate.invalid_thetasBivariate.load()Bivariate.log_probability_density()Bivariate.partial_derivative()Bivariate.partial_derivative_scalar()Bivariate.pdf()Bivariate.percent_point()Bivariate.ppf()Bivariate.probability_density()Bivariate.sample()Bivariate.save()Bivariate.select_copula()Bivariate.subclasses()Bivariate.tauBivariate.thetaBivariate.theta_intervalBivariate.to_dict()
ClaytonCopulaTypesFrankGumbel
- climb.tool.impl.data_suite.third_party.copulas.multivariate package
- Submodules
- climb.tool.impl.data_suite.third_party.copulas.multivariate.base module
MultivariateMultivariate.cdf()Multivariate.check_fit()Multivariate.cumulative_distribution()Multivariate.fit()Multivariate.fittedMultivariate.from_dict()Multivariate.load()Multivariate.log_probability_density()Multivariate.pdf()Multivariate.probability_density()Multivariate.sample()Multivariate.save()Multivariate.to_dict()
- climb.tool.impl.data_suite.third_party.copulas.multivariate.gaussian module
GaussianMultivariateGaussianMultivariate.columnsGaussianMultivariate.covarianceGaussianMultivariate.cumulative_distribution()GaussianMultivariate.fit()GaussianMultivariate.from_dict()GaussianMultivariate.probability_density()GaussianMultivariate.sample()GaussianMultivariate.to_dict()GaussianMultivariate.univariates
- climb.tool.impl.data_suite.third_party.copulas.multivariate.tree module
- climb.tool.impl.data_suite.third_party.copulas.multivariate.vine module
VineCopulaVineCopula.modelVineCopula.u_matrixVineCopula.n_sampleVineCopula.n_varVineCopula.columnsVineCopula.tau_matVineCopula.truncatedVineCopula.depthVineCopula.treesVineCopula.ppfsVineCopula.fit()VineCopula.from_dict()VineCopula.get_likelihood()VineCopula.sample()VineCopula.to_dict()VineCopula.train_vine()
- Module contents
GaussianMultivariateGaussianMultivariate.columnsGaussianMultivariate.covarianceGaussianMultivariate.cumulative_distribution()GaussianMultivariate.fit()GaussianMultivariate.from_dict()GaussianMultivariate.probability_density()GaussianMultivariate.sample()GaussianMultivariate.to_dict()GaussianMultivariate.univariates
MultivariateMultivariate.cdf()Multivariate.check_fit()Multivariate.cumulative_distribution()Multivariate.fit()Multivariate.fittedMultivariate.from_dict()Multivariate.load()Multivariate.log_probability_density()Multivariate.pdf()Multivariate.probability_density()Multivariate.sample()Multivariate.save()Multivariate.to_dict()
TreeTreeTypesVineCopulaVineCopula.modelVineCopula.u_matrixVineCopula.n_sampleVineCopula.n_varVineCopula.columnsVineCopula.tau_matVineCopula.truncatedVineCopula.depthVineCopula.treesVineCopula.ppfsVineCopula.fit()VineCopula.from_dict()VineCopula.get_likelihood()VineCopula.sample()VineCopula.to_dict()VineCopula.train_vine()
- climb.tool.impl.data_suite.third_party.copulas.optimize package
- climb.tool.impl.data_suite.third_party.copulas.univariate package
- Submodules
- climb.tool.impl.data_suite.third_party.copulas.univariate.base module
BoundedTypeParametricTypeScipyModelUnivariateUnivariate.BOUNDEDUnivariate.PARAMETRICUnivariate.cdf()Univariate.check_fit()Univariate.cumulative_distribution()Univariate.fit()Univariate.fittedUnivariate.from_dict()Univariate.load()Univariate.log_probability_density()Univariate.pdf()Univariate.percent_point()Univariate.ppf()Univariate.probability_density()Univariate.sample()Univariate.save()Univariate.to_dict()
- climb.tool.impl.data_suite.third_party.copulas.univariate.beta module
- climb.tool.impl.data_suite.third_party.copulas.univariate.gamma module
- climb.tool.impl.data_suite.third_party.copulas.univariate.gaussian module
- climb.tool.impl.data_suite.third_party.copulas.univariate.gaussian_kde module
- climb.tool.impl.data_suite.third_party.copulas.univariate.log_laplace module
- climb.tool.impl.data_suite.third_party.copulas.univariate.selection module
- climb.tool.impl.data_suite.third_party.copulas.univariate.student_t module
- climb.tool.impl.data_suite.third_party.copulas.univariate.truncated_gaussian module
- climb.tool.impl.data_suite.third_party.copulas.univariate.uniform module
- Module contents
BetaUnivariateBoundedTypeGammaUnivariateGaussianKDEGaussianUnivariateLogLaplaceParametricTypeStudentTUnivariateTruncatedGaussianUniformUnivariateUnivariateUnivariate.BOUNDEDUnivariate.PARAMETRICUnivariate.cdf()Univariate.check_fit()Univariate.cumulative_distribution()Univariate.fit()Univariate.fittedUnivariate.from_dict()Univariate.load()Univariate.log_probability_density()Univariate.pdf()Univariate.percent_point()Univariate.ppf()Univariate.probability_density()Univariate.sample()Univariate.save()Univariate.to_dict()
Submodules¶
climb.tool.impl.data_suite.third_party.copulas.datasets module¶
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_bivariate_age_income(size=1000, seed=42)[source]¶
Sample from a bivariate toy dataset.
This dataset contains two columns which correspond to the simulated age and income which are positively correlated with outliers.
- Parameters:
- Retruns:
- pandas.DataFrame:
DataFrame with two columns,
ageandincome.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_trivariate_xyz(size=1000, seed=42)[source]¶
Sample from three dimensional toy dataset.
The output is a DataFrame containing three columns:
x: Beta distribution with a=0.1 and b=0.1y: Beta distribution with a=0.1 and b=0.5z: Normal distribution + 10 timesy
- Parameters:
- Retruns:
- pandas.DataFrame:
DataFrame with three columns,
x,yandz.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_bernoulli(size=1000, seed=42)[source]¶
Sample from a Bernoulli distribution with p=0.3.
The distribution is built by sampling a uniform random and then setting 0 or 1 depending on whether the value is above or below 0.3.
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_beta(size=1000, seed=42)[source]¶
Sample from a beta distribution with a=3 and b=1 and loc=4.
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_bimodal(size=1000, seed=42)[source]¶
Sample from a bimodal distribution which mixes two Gaussians at 0.0 and 10.0 with stdev=1.
The distribution is built by sampling a standard normal and a normal with mean
10and then selecting one or the other based on a bernoulli distribution.- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_degenerate(size=1000, seed=42)[source]¶
Sample from a degenerate distribution that only takes one random value.
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_exponential(size=1000, seed=42)[source]¶
Sample from an exponential distribution at 3.0 with rate 1.0.
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_normal(size=1000, seed=42)[source]¶
Sample from a normal distribution with mean 1 and stdev 1.
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
- climb.tool.impl.data_suite.third_party.copulas.datasets.sample_univariate_uniform(size=1000, seed=42)[source]¶
Sample from a uniform distribution in [-1.0, 3.0].
- Parameters:
- Retruns:
- pandas.Series:
Series with the sampled values.
climb.tool.impl.data_suite.third_party.copulas.visualization module¶
- climb.tool.impl.data_suite.third_party.copulas.visualization.compare_1d(real, synth, columns=None, figsize=None)[source]¶
- climb.tool.impl.data_suite.third_party.copulas.visualization.compare_2d(real, synth, columns=None, figsize=None)[source]¶
- climb.tool.impl.data_suite.third_party.copulas.visualization.compare_3d(real, synth, columns=None, figsize=(10, 4))[source]¶
- climb.tool.impl.data_suite.third_party.copulas.visualization.hist_1d(data, fig=None, title=None, position=None, bins=20, label=None)[source]¶
Plot 1 dimensional data in a histogram.
- climb.tool.impl.data_suite.third_party.copulas.visualization.scatter_2d(data, columns=None, fig=None, title=None, position=None)[source]¶
Plot 2 dimensional data in a scatter plot.
Module contents¶
Top-level package for Copulas.
- climb.tool.impl.data_suite.third_party.copulas.check_valid_values(function)[source]¶
Raises an exception if the given values are not supported.
- Parameters:
function (callable) – Method whose unique argument is a numpy.array-like object.
- Returns:
Decorated function
- Return type:
callable
- Raises:
ValueError – If there are missing or invalid values or if the dataset is empty.
- climb.tool.impl.data_suite.third_party.copulas.get_instance(obj, **kwargs)[source]¶
Create new instance of the
objargument.
- climb.tool.impl.data_suite.third_party.copulas.get_qualified_name(_object)[source]¶
Return the Fully Qualified Name from an instance or class.
- climb.tool.impl.data_suite.third_party.copulas.scalarize(function)[source]¶
Allow methods that only accepts 1-d vectors to work with scalars.
- Parameters:
function (callable) – Function that accepts and returns vectors.
- Returns:
Decorated function that accepts and returns scalars.
- Return type:
callable
- climb.tool.impl.data_suite.third_party.copulas.store_args(__init__)[source]¶
Save
*argsand**kwargsused in the__init__of a copula.- Parameters:
__init__ (callable) –
__init__function to store their arguments.- Returns:
Decorated
__init__function.- Return type:
callable
- climb.tool.impl.data_suite.third_party.copulas.vectorize(function)[source]¶
Allow a method that only accepts scalars to accept vectors too.
This decorator has two different behaviors depending on the dimensionality of the array passed as an argument:
1-d array
It will work under the assumption that the function argument is a callable with signature:
function(self, X, *args, **kwargs)
where X is an scalar magnitude.
In this case the arguments of the input array will be given one at a time, and both the input and output of the decorated function will have shape (n,).
2-d array
It will work under the assumption that the function argument is a callable with signature:
function(self, X0, ..., Xj, *args, **kwargs)
where Xi are scalar magnitudes.
It will pass the contents of each row unpacked on each call. The input is espected to have shape (n, j), the output a shape of (n,)
It will return a function that is guaranteed to return a numpy.array.
- Parameters:
function (callable) – Function that only accept and return scalars.
- Returns:
Decorated function that can accept and return
numpy.array.- Return type:
callable