Skip to content

assert_negative_support function is being used inside the StickBreakingWeights multivariate distribution. #5997

@pibieta

Description

@pibieta

Remove calls to the assert_negative_support

In relation to the issue #5162 where the calls to the assert_negative_support function were removed. We should also remove the calls of this function inside the Multivariate module, the only class that uses this function is StickBreakingWeights.

@classmethod
def dist(cls, alpha, K, *args, **kwargs):
alpha = at.as_tensor_variable(floatX(alpha))
K = at.as_tensor_variable(intX(K))
assert_negative_support(alpha, "alpha", "StickBreakingWeights")
assert_negative_support(K, "K", "StickBreakingWeights")
return super().dist([alpha, K], **kwargs)

Moreover, the function is being imported from the continuous.py:

from pymc.distributions.continuous import (
BoundedContinuous,
ChiSquared,
Normal,
assert_negative_support,
)

that will be deprecated in future versions of pyMC. Shouldn't we remove the calls and the import from this module?

#DataUmbrellaPyMCSprint
cc: @reshamas, @vitaliset, @ricardoV94, @OriolAbril

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions