copulas/univariate/kde.py
def from_dict(cls, copula_dict):
        """Set attributes with provided values."""
        instance = cls()

        instance.fitted = copula_dict['fitted']
        instance.constant_value = copula_dict['constant_value']

        if instance.fitted and not instance.constant_value:
            instance.model = scipy.stats.gaussian_kde([-1, 0, 0])

            for key in ['dataset', 'covariance', 'inv_cov']:
                copula_dict[key] = np.array(copula_dict[key])

            attributes = ['d', 'n', 'dataset', 'covariance', 'factor', 'inv_cov']
            for name in attributes:
                setattr(instance.model, name, copula_dict[name])

        return instance
Set attributes with provided values.
Set attributes with provided values.
Set attributes with provided values .
def from_dict(cls, copula_dict):
        instance = cls()
        instance.fitted = copula_dict['fitted']
        instance.constant_value = copula_dict['constant_value']
        if instance.fitted and not instance.constant_value:
            instance.model = scipy.stats.gaussian_kde([-1, 0, 0])
            for key in ['dataset', 'covariance', 'inv_cov']:
                copula_dict[key] = np.array(copula_dict[key])
            attributes = ['d', 'n', 'dataset', 'covariance', 'factor', 'inv_cov']
            for name in attributes:
                setattr(instance.model, name, copula_dict[name])
        return instance
def from_dict ( cls , copula_dict ) : instance = cls ( ) instance . fitted = copula_dict [ 'fitted' ] instance . constant_value = copula_dict [ 'constant_value' ] if instance . fitted and not instance . constant_value : instance . model = scipy . stats . gaussian_kde ( [ - 1 , 0 , 0 ] ) for key in [ 'dataset' , 'covariance' , 'inv_cov' ] : copula_dict [ key ] = np . array ( copula_dict [ key ] ) attributes = [ 'd' , 'n' , 'dataset' , 'covariance' , 'factor' , 'inv_cov' ] for name in attributes : setattr ( instance . model , name , copula_dict [ name ] ) return instance
Set attributes with provided values.
Set attributes with provided values .
"""Set attributes with provided values."""
cls
copula_dict