Implement advanced rf training for s2d #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @JonasHell @k-dominik, @akreshuk
I have implemented a training routine for random forests for shallow 2 deep here that trains RFs in stages, and selects the training examples for each stage by taking the worst predictions from forests from the previous stage, similar to what we discussed during the retreat. This is implemented with
prepare_shallow2deep_advanced
by adding asampling_strategy
parameter that enables customizing the sampling of random forest training samples. (And using the strategy described above by default).I will train a RF for mito segmentation based on this shortly and share it, to see if it improves results. And if you have other sampling strategies (e.g. sampling scribbles instead of points), we could eventually think about adding them here.
In more detail, here''s how the
sampling_strategy
is implemented (copied from the docstring):