Created
December 24, 2021 16:03
-
-
Save ashhadulislam/7bc6ed67d7302099081769a292bcbd59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.datasets import load_breast_cancer | |
import numpy as np | |
import collections | |
from knnor import data_augment | |
dataset = load_breast_cancer() | |
(unique, counts) = np.unique(dataset['target'], return_counts=True) | |
print('Unique values of the target variable', unique) | |
print('Counts of the target variable :', counts) | |
X=dataset["data"] | |
y=dataset["target"] | |
print("Original shape=",X.shape,y.shape) | |
elements_count = collections.Counter(y) | |
# printing the element and the frequency | |
print("Original 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