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

HSSM does not properly send priors to Bambi for an HSGP #624

Open
theonlydvr opened this issue Jan 8, 2025 · 0 comments
Open

HSSM does not properly send priors to Bambi for an HSGP #624

theonlydvr opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@theonlydvr
Copy link

Describe the bug
When setting up a regression for a model parameter with an HSGP term, HSSM is unable to construct a model without raising the following error:

ValueError: The priors for an HSGP term must be passed within a dictionary. Keys must the names of the parameters of the covariance function and values are instances of bambi.Prior or numeric constants.

HSSM version
0.2.5

To Reproduce
Create an HSSM model as normal and provide a regression formula for any parameter like below:

 "name": "a",
 "formula": "a ~ 0 + hsgp(stim, m=10, c=2, centered=True)",
 "prior": {
     "hsgp(stim, m=10, c=2, centered=True)": {
          "name": "HSGP",
          "sigma": bmb.Prior("Exponential", lam=2), # amplitude
          "ell": bmb.Prior("InverseGamma", mu=10, sigma=1) # lengthscale
    },
    "sigma": Prior("HalfNormal", sigma=10)
}

Additional context
It seems like this issue occurs because HSSM automatically creates a bmb.Prior object while the HSGP expects to receive a dictionary.

@AlexanderFengler AlexanderFengler self-assigned this Jan 21, 2025
@AlexanderFengler AlexanderFengler added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants