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

implement an oversampling function #30

Closed
KennethEnevoldsen opened this issue Aug 10, 2021 · 0 comments
Closed

implement an oversampling function #30

KennethEnevoldsen opened this issue Aug 10, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@KennethEnevoldsen
Copy link
Owner

Augmentation can be used to oversample a category.

Imagined usage would look something like this:

aug = augmenty.load(...)

def is_positive(example):
    """return true if the example contains an entity"""
    if example.y.cats["positive"] == 1:
        return True
    return False

upsampled_corpus = augumenty.oversample(corpus, augmenter=aug, conditional=is_positive, n=1000)
@KennethEnevoldsen KennethEnevoldsen added the enhancement New feature or request label Aug 10, 2021
@KennethEnevoldsen KennethEnevoldsen added this to the version 1.0.0 milestone Aug 10, 2021
@KennethEnevoldsen KennethEnevoldsen removed this from the version 1.0.0 milestone Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant