예제 #1
0
    def test_probability_density(self):
        """Probability_density computes probability for the given values."""
        # Setup
        copula = GaussianMultivariate(GaussianUnivariate)
        copula.fit(self.data)
        X = np.array([2000., 200., 0.])
        expected_result = 0.032245296420409846

        # Run
        result = copula.probability_density(X)

        # Check
        self.assertAlmostEqual(result, expected_result)
예제 #2
0
    def test_probability_density(self):
        """Probability_density computes probability for the given values."""
        # Setup
        copula = GaussianMultivariate()
        copula.fit(self.data)
        X = np.array([[0., 0., 0.]])
        expected_result = 0.059566912334560594

        # Run
        result = copula.probability_density(X)

        # Check
        assert result == expected_result
예제 #3
0
    def test_probability_density(self):
        """Probability_density computes probability for the given values."""
        # Setup
        copula = GaussianMultivariate(
            distribution='copulas.univariate.gaussian.GaussianUnivariate')
        copula.fit(self.data)
        X = np.array([2000., 200., 0.])
        expected_result = 0.031163598715950383

        # Run
        result = copula.probability_density(X)

        # Check
        self.assertAlmostEqual(result, expected_result)