Skip to content

An example on heteroskedastic noise with StudentT likelihood #1730

Answered by gustavocmv
IvanDeBoi asked this question in Q&A
Discussion options

You must be logged in to vote

This happens because HeteroskedasticTFPConditional calls the distribution_class as distribution_class(loc, scale), using positional arguments. However, tfp.distributions.StudentT expects signature is tfp.distributions.StudentT(df, loc, scale).

There are some possibilities to work around it. If you want a fixed value for the df parameter, you can just call:

df = 3.0
likelihood = gpf.likelihoods.HeteroskedasticTFPConditional(
    distribution_class=lambda loc, scale: tfp.distributions.StudentT(df=df, loc, scale),
    scale_transform=tfp.bijectors.Exp(), # Exponential Transform
)

If you want to have the df parameter not fixed, I'd suggest subclassing MultiLatentTFPConditional.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by st--
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1722 on October 27, 2021 07:41.