Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 12, 2020 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/e7b01937fc39d7eb8ca67d19cd9223fd to your computer and use it in GitHub Desktop.
Save amankharwal/e7b01937fc39d7eb8ca67d19cd9223fd to your computer and use it in GitHub Desktop.
X, y = make_classification(n_samples=100, n_features=2,
n_informative=2, n_redundant=0,
n_classes=2, weights=[0.2, 0.8],
class_sep=0.95, random_state=0)
plt.figure(figsize=(12, 8))
plt.title('Repartition before SMOTE')
plt.scatter(X[y==1][:, 0], X[y==1][:, 1], label='class 1')
plt.scatter(X[y==0][:, 0], X[y==0][:, 1], label='class 0')
plt.legend()
plt.grid(False)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment