-
Notifications
You must be signed in to change notification settings - Fork 604
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
Add replace option to subsample and rename function to sample #943
base: main
Are you sure you want to change the base?
Conversation
Maybe we should make a new function called |
I'd like to merge this. I think we could just rename the function, and deprecate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few minor comments.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #943 +/- ##
==========================================
- Coverage 76.50% 76.37% -0.13%
==========================================
Files 111 112 +1
Lines 12874 12927 +53
==========================================
+ Hits 9849 9873 +24
- Misses 3025 3054 +29
|
8bcd5b2
to
59a171c
Compare
so that we can do sampling with replacement. It can be useful for bootstrap samples i.e. sc.pp.subsample(adata, n_obs=adata.n_obs, replace=True). We can also sample fractions > 1, but then it's not really subsampling.