Last active
October 21, 2020 02:58
-
-
Save GuokaiLiu/2a3e6e64bd691da9d6bb1c62fcf881d2 to your computer and use it in GitHub Desktop.
[失衡索引] #imbalance
This file contains 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
# Make imbalanced training samples | |
print(X_train.shape) | |
print(Y_train.shape) | |
a = [] | |
for i in range(10): | |
for j in range(100): | |
if i!=4: | |
a.append(i*100+j) | |
elif j<10: | |
a.append(i*100+j) | |
print(a) | |
X_train = X_train[a,:] | |
Y_train = Y_train[a,:] | |
print(X_train.shape) | |
print(Y_train.shape) | |
# Make imbalanced training samples |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment