def test_cumulative_distribution_fit_call_pd(self): """Cumulative_density integrates the probability density along the given values.""" # Setup copula = GaussianMultivariate(GaussianUnivariate) copula.fit(self.data.values) X = np.array([2000., 200., 1.]) expected_result = 0.4550595153746892 # Run result = copula.cumulative_distribution(X) # Check assert np.isclose(result, expected_result, atol=1e-5).all().all()
def test_cumulative_distribution_fit_call_pd(self): """Cumulative_density integrates the probability density along the given values.""" # Setup copula = GaussianMultivariate() copula.fit(self.data.values) X = pd.Series([1., 1., 1.]) expected_result = 0.5822020991592192 # Run result = copula.cumulative_distribution(X) # Check assert np.isclose(result, expected_result).all().all()
def test_cumulative_distribution_fit_call_np_array(self): """Cumulative_density integrates the probability density along the given values.""" # Setup copula = GaussianMultivariate( distribution='copulas.univariate.gaussian.GaussianUnivariate') copula.fit(self.data.values) X = np.array([2000., 200., 1.]) expected_result = 0.4460456536217443 # Run result = copula.cumulative_distribution(X) # Check assert np.isclose(result, expected_result, atol=1e-5).all().all()