Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pibieta opened this issue Jul 22, 2022 · 2 comments

Comments

@pibieta
Copy link
Contributor

pibieta commented Jul 22, 2022

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

@dihanster
Copy link

Working on it!

@michaelosthege
Copy link
Member

Closed by #6034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants