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

Count_ratio in placement apply chunk ratio twice. #822

Closed
drodarie opened this issue Mar 25, 2024 · 0 comments · Fixed by #824
Closed

Count_ratio in placement apply chunk ratio twice. #822

drodarie opened this issue Mar 25, 2024 · 0 comments · Fixed by #824
Assignees
Labels
bug Something isn't working

Comments

@drodarie
Copy link
Contributor

In bsb.placement.indicator.py in function guess: when an estimate is a "count_ratio" of another cell type, then its estimate is done for a speciffic chunk with:

estimate = (
                    sum(
                        PlacementIndicator(s, relation).guess(chunk, voxels)
                        for s in strats
                    )
                    * count_ratio
                )

However, the line afterwards does also a ratio to obtain an estimate for the provided chunk:

estimate = self._estim_for_chunk(chunk, estimate)

Which means that the final estimate is incorrect.

@drodarie drodarie self-assigned this Mar 25, 2024
@drodarie drodarie added the bug Something isn't working label Mar 25, 2024
Helveg added a commit that referenced this issue Mar 28, 2024
* Fix count_ratio estimate, add tests. See #822

* Split tests on Placement Indicator between count and count_ratio.

* Add feature relative to density_key.
Add more tests.

* Update bsb/placement/indicator.py

---------

Co-authored-by: Robin De Schepper <robin.deschepper93@gmail.com>
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

Successfully merging a pull request may close this issue.

1 participant