Exemplo n.º 1
0
    def test_to_dict(self):
        """To_dict returns the defining parameters of a copula in a dict."""
        # Setup
        instance = Bivariate('frank')
        instance.fit(self.X)

        expected_result = {
            'copula_type': 'FRANK',
            "tau": 0.014492753623188406,
            "theta": 0.13070829945417198
        }

        # Run
        result = instance.to_dict()

        # Check
        assert result == expected_result
Exemplo n.º 2
0
    def test_to_dict(self):
        """To_dict returns the defining parameters of a copula in a dict."""
        # Setup
        instance = Bivariate(copula_type='frank')
        instance.fit(self.X)

        expected_result = {
            'copula_type': 'FRANK',
            "tau": 0.9128709291752769,
            "theta": 44.2003852484162
        }

        # Run
        result = instance.to_dict()

        # Check
        assert result == expected_result