augmenty icon indicating copy to clipboard operation
augmenty copied to clipboard

implement an oversampling function

Open KennethEnevoldsen opened this issue 2 years ago • 0 comments

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 avatar Aug 10 '21 17:08 KennethEnevoldsen