Refine output message
Browse files
app.py
CHANGED
|
@@ -34,7 +34,17 @@ def get_clusters_plot(n_blobs, quantile, cluster_std):
|
|
| 34 |
markersize=14,
|
| 35 |
)
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
return fig, message
|
| 39 |
|
| 40 |
|
|
|
|
| 34 |
markersize=14,
|
| 35 |
)
|
| 36 |
|
| 37 |
+
if len(centers) != n_clusters_:
|
| 38 |
+
message = (
|
| 39 |
+
f"The number of estimated clusters {n_clusters_}"
|
| 40 |
+
" differs from the true number of clusters. ({n_blobs}).",
|
| 41 |
+
"\n Try changing the bandwidth parameter.",
|
| 42 |
+
)
|
| 43 |
+
else:
|
| 44 |
+
message = (
|
| 45 |
+
f"The number of estimated clusters {n_clusters_}"
|
| 46 |
+
"matches the true number of clusters. ({n_blobs})!",
|
| 47 |
+
)
|
| 48 |
return fig, message
|
| 49 |
|
| 50 |
|