Celine
commited on
Commit
•
b330ea1
1
Parent(s):
6b29618
clusters coloured by cluster
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ def compute(number_of_samples, number_of_clusters, randomised_state):
|
|
16 |
|
17 |
fig = plt.figure()
|
18 |
ax1 = fig.add_subplot(111)
|
19 |
-
ax1.scatter(scaled_features[:,0], scaled_features[:,1],
|
20 |
-
ax1.scatter(kmeans.cluster_centers_[:,0],kmeans.cluster_centers_[:,1], s=
|
21 |
plt.legend(loc='upper left')
|
22 |
return fig
|
23 |
|
|
|
16 |
|
17 |
fig = plt.figure()
|
18 |
ax1 = fig.add_subplot(111)
|
19 |
+
ax1.scatter(scaled_features[:,0], scaled_features[:,1], c=kmeans.labels_, s=8, marker="o", label='dataset')
|
20 |
+
ax1.scatter(kmeans.cluster_centers_[:,0],kmeans.cluster_centers_[:,1], s=50, c='r', marker="o", label='cluster centers')
|
21 |
plt.legend(loc='upper left')
|
22 |
return fig
|
23 |
|
dev.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|