Skip to content

Instantly share code, notes, and snippets.

@GuokaiLiu
Last active October 21, 2020 02:58
Show Gist options
  • Save GuokaiLiu/2a3e6e64bd691da9d6bb1c62fcf881d2 to your computer and use it in GitHub Desktop.
Save GuokaiLiu/2a3e6e64bd691da9d6bb1c62fcf881d2 to your computer and use it in GitHub Desktop.
[失衡索引] #imbalance
# 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