angelolab / Nimbus

Other
12 stars 1 forks source link

Filter out sparse examples from the training data #36

Closed JLrumberger closed 1 year ago

JLrumberger commented 1 year ago

What is the purpose of this PR?

This PR closes #34 by adding function quantile_filter to ModelBuilder.

How did you implement your changes Added function quantile_filter to the ModelBuilder class that first calculates the x-quantile of positive cells per tile for each marker and then filters out the tiles whose number of positive cells is below the quantile. Also I aligned prep_data in ModelBuilder with the one that was in PromixNaive before. Thus we can get rid of the one in PromixNaive because it gets inherited from ModelBuilder.

Remaining issues

None