Skip to content

[MRG] Subsampling transformer #259

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

Merged
merged 15 commits into from
Oct 24, 2024
Merged

[MRG] Subsampling transformer #259

merged 15 commits into from
Oct 24, 2024

Conversation

rflamary
Copy link
Collaborator

The main idea is to provide a Subsampler that can be done in a pipeline in order to speedup some methods that do not scale well with number of samples.

),
)

idx = self.rng_.choice(X.shape[0], self.n_subsample, replace=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

In practical scenarios, do we need the sampling to be done per-domain? 🤔 It might be the case that the result of sampler omits domains with few(-er) entries.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this case do we create a DomainStratifiedSampleTransformer or do we add a parameter? In any Case we should probably use sklearn or skada Splitters here

Copy link
Collaborator

@kachayev kachayev Oct 23, 2024

Choose a reason for hiding this comment

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

I'm always for having separate classes if the use case is clear. Much easier to just open the list of things to spot what you're looking for! Having separate class DomainStratifiedSampleTransformer sounds great.

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 97.67442% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.16%. Comparing base (85b81d8) to head (e6ec846).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #259   +/-   ##
=======================================
  Coverage   97.15%   97.16%           
=======================================
  Files          57       59    +2     
  Lines        6049     6135   +86     
=======================================
+ Hits         5877     5961   +84     
- Misses        172      174    +2     

@rflamary rflamary changed the title [TO REVIEW] Subsampling transformer [MRG] Subsampling transformer Oct 24, 2024
@antoinecollas antoinecollas merged commit bdfae9e into main Oct 24, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants