Spaces:
Sleeping
Sleeping
Commit
路
f1f0a23
1
Parent(s):
f651651
Provide Elbow K
Browse files
app.py
CHANGED
|
@@ -709,6 +709,7 @@ def compute_global_regression(df_combined, embedding_cols, tsne_params, df_f1, r
|
|
| 709 |
"silhouette": silhouette,
|
| 710 |
"inertias": inertias,
|
| 711 |
"silhouette_opt": silhouette_opt,
|
|
|
|
| 712 |
}
|
| 713 |
|
| 714 |
if reduction_method == "PCA":
|
|
@@ -868,6 +869,7 @@ def run_model(model_name):
|
|
| 868 |
st.bokeh_chart(p, use_container_width=True)
|
| 869 |
|
| 870 |
st.write(f"Silhouette Score: {result['silhouette_opt']:.2f}")
|
|
|
|
| 871 |
|
| 872 |
# # Mostrar los plots de loadings si se us贸 PCA (para el conjunto combinado)
|
| 873 |
# if reduction_method == "PCA" and result.get("pca_model") is not None:
|
|
|
|
| 709 |
"silhouette": silhouette,
|
| 710 |
"inertias": inertias,
|
| 711 |
"silhouette_opt": silhouette_opt,
|
| 712 |
+
"elbow_k": elbow_k
|
| 713 |
}
|
| 714 |
|
| 715 |
if reduction_method == "PCA":
|
|
|
|
| 869 |
st.bokeh_chart(p, use_container_width=True)
|
| 870 |
|
| 871 |
st.write(f"Silhouette Score: {result['silhouette_opt']:.2f}")
|
| 872 |
+
st.write(f"Optimal number of clusters (k) from Elbow Method: {result['elbow_k']:.2f}")
|
| 873 |
|
| 874 |
# # Mostrar los plots de loadings si se us贸 PCA (para el conjunto combinado)
|
| 875 |
# if reduction_method == "PCA" and result.get("pca_model") is not None:
|