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

Only sort the upper tail weights #20

Closed
sethaxen opened this issue Dec 29, 2021 · 0 comments · Fixed by #22
Closed

Only sort the upper tail weights #20

sethaxen opened this issue Dec 29, 2021 · 0 comments · Fixed by #22

Comments

@sethaxen
Copy link
Member

As pointed out in stan-dev/loo#185, we only need the last M tail indices, so instead of sorting the whole array of weights, we can just sort the upper tail weights, which at least for Vector is faster. We can do this by replacing sortperm with partialsortperm.

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

Successfully merging a pull request may close this issue.

1 participant