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

Indexing errors with multi-level GPs #1081

Closed
Reece844 opened this issue Jan 29, 2021 · 2 comments
Closed

Indexing errors with multi-level GPs #1081

Reece844 opened this issue Jan 29, 2021 · 2 comments
Labels
Milestone

Comments

@Reece844
Copy link

When specifying a model with something like gp(x,y, by=factor) in the formula, the code generated in the partial log likelihood function will result in a run-time error.

For example, the error occurs due to the way indexing is done without threads, using Igp_1_* and the slicing.

mu[Igp_1_1[start:end]] += Cgp_1_1[start:end] .* gp_pred_1_1[Jgp_1_1[start:end]];
mu[Igp_1_2[start:end]] += Cgp_1_2[start:end] .* gp_pred_1_2[Jgp_1_2[start:end]];
mu[Igp_1_3[start:end]] += Cgp_1_3[start:end] .* gp_pred_1_3[Jgp_1_3[start:end]];
mu[Igp_1_4[start:end]] += Cgp_1_4[start:end] .* gp_pred_1_4[Jgp_1_4[start:end]];

There are a couple different workarounds I can think of, the easiest being to have separate reduce_sum calls for each factor, but I don't know how that would affect speed.

@paul-buerkner
Copy link
Owner

paul-buerkner commented Jan 29, 2021 via email

@paul-buerkner paul-buerkner added this to the brms 2.14.0++ milestone Feb 4, 2021
paul-buerkner added a commit that referenced this issue Feb 4, 2021
@paul-buerkner
Copy link
Owner

This should now be fixed on github. Thanks again for opening this issue.

paul-buerkner added a commit that referenced this issue Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants