Created
July 18, 2019 19:13
-
-
Save michelkana/368aca9205289c85705b437d28b2b827 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
# create new random points | |
X_new = np.zeros((100,2)) | |
X_new[:,0] = np.random.uniform(-3, 3, 100) | |
X_new[:,1] = np.random.uniform(-1, 4, 100) | |
Y_new = model_cl.predict_proba(X_new) | |
Y_new_label = np.argmax(Y_new, axis=1) | |
for cloud in clouds: | |
i = np.where(Y_new_label==cloud['label'], True, False) | |
plt.scatter(X_new[i][:,0], X_new[i][:,1], marker=cloud['marker'], color=cloud['color'], label=cloud['label']) | |
plt.xlabel('x') | |
plt.ylabel('y') | |
plt.title('prediction on unseen random data') | |
plt.legend(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment