Skip to content

Conversation

camisowers
Copy link
Contributor

@camisowers camisowers commented Jun 14, 2023

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

After testing the mixing score on 100 images and across various populations, we determined that total cell count was more useful to restrict rather than counts for the individual populations. As a result, we need to be more restrictive with the ratio of cells that we allow. The defaults that seem to work best are ratio_threshold=5 and cell_count_thresh=200.

For plotting the ratios in the mixing notebook, we should drop any bigger than 15. Large ratio values just mess with the x axis and makes the plots hard to interpret.
Image

Image

How did you implement your changes

Change the threshold default values in both the notebook and the code. For the output file, only return one cell_ratio value per image, instead of both the pop1/pop2 ratio and pop2/pop1 ratio.

Adjust the notebook to

  1. Check for and automatically generate the specified neighbor matrix, rather than rely on the user to run the correct cell.
  2. Tweak the ratio plots to have x-limit 15 and the mixing histogram plot to always start at 0.

Remaining issues

N/A

@camisowers camisowers added the enhancement New feature or request label Jun 14, 2023
@camisowers camisowers self-assigned this Jun 14, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@camisowers camisowers marked this pull request as ready for review June 14, 2023 22:27
@camisowers camisowers requested a review from srivarra June 14, 2023 22:31
Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking goood, just a np.nan filtering suggestion.

@camisowers camisowers requested a review from srivarra June 15, 2023 18:49
@camisowers camisowers requested a review from ngreenwald June 15, 2023 18:55
Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff

@ngreenwald ngreenwald merged commit 40f45a6 into main Jun 15, 2023
@ngreenwald ngreenwald deleted the mixing_robustness branch June 15, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants