Skip to content

Instantly share code, notes, and snippets.

@amueller
Last active December 22, 2015 07:19
Show Gist options
  • Save amueller/6437391 to your computer and use it in GitHub Desktop.
Save amueller/6437391 to your computer and use it in GitHub Desktop.
explain what I mean by checker board
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