Skip to content

Sequential down sample implementation for imbalanced data classification.

License

Notifications You must be signed in to change notification settings

KiLJ4EdeN/SequentialDownSampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SequentialDownSampler

Sequential down sampling implementation for imbalanced data classification.

License Version Code size Repo size Issue open Issue closed

Usage:

Install Dependencies w pip:

1- numpy

Import the SequentialDownSampler Class and Create an Instance with Desired Settings.

from SequentialDownSampler import SequentialDownSampler
import numpy as np

# create a fake dataset.
X = np.random.rand(1000, 224, 224, 3)
Y = np.random.randint(0, 2, size=(1000))

# initiate the downsampler selecting the class to downsample and the ratio.
seqds = SequentialDownSampler(X, Y, dclass=1, ratio=3)

Perform Downsampling on your Dataset.

# perform downsampling.
X, Y = seqds.downsample()

print(X.shape)
print(Y.shape)

About

Sequential down sample implementation for imbalanced data classification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages