Skip to content

Instantly share code, notes, and snippets.

@ashhadulislam
Created December 24, 2021 16:05
Show Gist options
  • Save ashhadulislam/046b888558169ee7e39dbb6571b4b240 to your computer and use it in GitHub Desktop.
Save ashhadulislam/046b888558169ee7e39dbb6571b4b240 to your computer and use it in GitHub Desktop.
knnor=data_augment.KNNOR()
X_new,y_new,_,_=knnor.fit_resample(X,y)
print("Shape after augmentation",X_new.shape,y_new.shape)
elements_count = collections.Counter(y_new)
# printing the element and the frequency
print("Final distribution:")
for key, value in elements_count.items():
print(f"{key}: {value}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment