Created
April 24, 2018 06:44
-
-
Save orico/9af66d15d395b9beeefc0176511318f7 to your computer and use it in GitHub Desktop.
PCAAE-plotclusters.py
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
def plot3clusters(X, title, vtitle): | |
plt.figure() | |
colors = ['navy', 'turquoise', 'darkorange'] | |
lw = 2 | |
for color, i, target_name in zip(colors, [0, 1, 2], target_names): | |
plt.scatter(X[y == i, 0], X[y == i, 1], color=color, alpha=1., lw=lw, | |
label=target_name) | |
plt.legend(loc='best', shadow=False, scatterpoints=1) | |
plt.title(title) | |
plt.xlabel(vtitle + "1") | |
plt.ylabel(vtitle + "2") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment