Skip to content
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

Implemented a stratified sampler #539

Merged
merged 22 commits into from
Feb 19, 2024
Merged

Implemented a stratified sampler #539

merged 22 commits into from
Feb 19, 2024

Conversation

jnsLs
Copy link
Collaborator

@jnsLs jnsLs commented May 16, 2023

the StratifiedSampler class takes a partition_criterion (class), which defines the property for the sampling process.
Currently there are two classes implemented suitable for parition_criterion, namely NumberOfAtomsCriterion and PropertyCriterion. The former can, e.g., be used to train QM9 while making sure that small molecules are sampled as often as larger molecules. The latter emphasizes on property ranges which are underrepresented in the dataset.

  • using batch sampler by default
  • updated docs

the property stratified sampler can be utilized by adding +data/sampler=stratified_property in the CLI

@jnsLs jnsLs requested review from Maltimore and removed request for stefaanhessmann February 15, 2024 14:16
src/schnetpack/data/sampler.py Show resolved Hide resolved
src/schnetpack/data/sampler.py Show resolved Hide resolved
src/schnetpack/data/sampler.py Outdated Show resolved Hide resolved
jnsLs and others added 5 commits February 19, 2024 10:01
Copy link
Collaborator

@Maltimore Maltimore left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jnsLs jnsLs merged commit c3a4b30 into master Feb 19, 2024
@jnsLs jnsLs deleted the jl-sh/stratified_sampler branch February 19, 2024 12:03
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.

2 participants