Spaces:
Sleeping
Sleeping
Commit
路
f36dfc5
1
Parent(s):
6a1814d
Show Continuity and Trustworthiness for PCA
Browse files
app.py
CHANGED
|
@@ -771,6 +771,7 @@ def run_model(model_name):
|
|
| 771 |
tsne_params = {"perplexity": perplexity_val, "learning_rate": learning_rate_val}
|
| 772 |
|
| 773 |
result = compute_global_regression(df_combined, embedding_cols, tsne_params, df_f1, reduction_method=reduction_method, distance_metric=distance_metric.lower())
|
|
|
|
| 774 |
|
| 775 |
reg_metrics = pd.DataFrame({
|
| 776 |
"Slope": [result["slope"]],
|
|
@@ -787,10 +788,10 @@ def run_model(model_name):
|
|
| 787 |
"Explained Variance": result["explained_variance"]
|
| 788 |
})
|
| 789 |
st.table(variance_df)
|
| 790 |
-
elif reduction_method == "t-SNE":
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
|
| 795 |
# # Mostrar los plots de loadings si se us贸 PCA (para el conjunto combinado)
|
| 796 |
# if reduction_method == "PCA" and result.get("pca_model") is not None:
|
|
|
|
| 771 |
tsne_params = {"perplexity": perplexity_val, "learning_rate": learning_rate_val}
|
| 772 |
|
| 773 |
result = compute_global_regression(df_combined, embedding_cols, tsne_params, df_f1, reduction_method=reduction_method, distance_metric=distance_metric.lower())
|
| 774 |
+
print(result)
|
| 775 |
|
| 776 |
reg_metrics = pd.DataFrame({
|
| 777 |
"Slope": [result["slope"]],
|
|
|
|
| 788 |
"Explained Variance": result["explained_variance"]
|
| 789 |
})
|
| 790 |
st.table(variance_df)
|
| 791 |
+
# elif reduction_method == "t-SNE":
|
| 792 |
+
st.subheader(f"{reduction_method} Quality Metrics")
|
| 793 |
+
st.write(f"Trustworthiness: {result['trustworthiness']:.4f}")
|
| 794 |
+
st.write(f"Continuity: {result['continuity']:.4f}")
|
| 795 |
|
| 796 |
# # Mostrar los plots de loadings si se us贸 PCA (para el conjunto combinado)
|
| 797 |
# if reduction_method == "PCA" and result.get("pca_model") is not None:
|