Created
April 18, 2019 15:13
-
-
Save gabriel19913/94c4bd0640758a2c07c3e659dd2d0253 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
C1 = np.random.multivariate_normal(np.array([5, 5]), np.array([[1, 0],[0, 1]]), 500) | |
C2 = np.random.multivariate_normal(np.array([0, 0]), np.array([[1, 0],[0, 1]]), 500) | |
data1 = pd.DataFrame({'X1':C1[:,0],'X2':C1[:,1]}) | |
data1['Class'] = np.full((500, 1), 'C1') | |
data2 = pd.DataFrame({'X1':C2[:,0],'X2':C2[:,1]}) | |
data1['Class'] = np.full((500, 1), 'C2') | |
data = pd.concat([data1, data2], sort=True) | |
ax = sns.scatterplot(x="X1", y="X2", data=data, hue='Class',) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment