Last active
December 22, 2015 07:19
-
-
Save amueller/6437391 to your computer and use it in GitHub Desktop.
explain what I mean by checker board
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
n_samples = 1000 | |
X = np.random.uniform(8, size=(n_samples, 2)) | |
y = np.floor(X[:, 0]) % 2 * np.floor(X[:,1]) % 2 + (1 + np.floor(X[:, 0])) % 2 * ( 1+ np.floor(X[:,1])) % 2 | |
plt.scatter(X[:, 0], X[:, 1], c=y, s=100) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment