Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,6 @@ summary = summary.round(2)
|
|
| 61 |
|
| 62 |
slight_summary = summary[['mean', 'std', '25%', '50%', '75%', 'max']]
|
| 63 |
|
| 64 |
-
st.write("### Summary Table")
|
| 65 |
st.dataframe(slight_summary, use_container_width=True)
|
| 66 |
|
| 67 |
|
|
@@ -107,7 +106,7 @@ df_out = df.copy()
|
|
| 107 |
df_out["complexity_score"] = cs
|
| 108 |
df_out["complexity_rank"] = df_out["complexity_score"].rank(method="min", ascending=False).astype(int)
|
| 109 |
|
| 110 |
-
st.write("
|
| 111 |
st.dataframe(df_out, use_container_width=True)
|
| 112 |
|
| 113 |
|
|
@@ -161,24 +160,28 @@ st.pyplot(fig)
|
|
| 161 |
# =====================
|
| 162 |
# CORRELATIONS
|
| 163 |
# =====================
|
| 164 |
-
st.subheader("📡 Domain-Wise
|
| 165 |
|
| 166 |
domains = sorted(df["Domain"].unique())
|
| 167 |
n_domains = len(domains)
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
| 170 |
axes = axes.flatten()
|
| 171 |
|
| 172 |
for i, dom in enumerate(domains):
|
| 173 |
sub = df[df["Domain"] == dom][metrics]
|
| 174 |
corr = sub.corr()
|
| 175 |
|
| 176 |
-
sns.heatmap(corr, cmap="coolwarm", square=True, cbar=False,
|
| 177 |
xticklabels=False, yticklabels=False, ax=axes[i])
|
| 178 |
-
axes[i].set_title(dom)
|
| 179 |
|
| 180 |
for j in range(i + 1, len(axes)):
|
| 181 |
axes[j].axis("off")
|
| 182 |
|
|
|
|
| 183 |
plt.tight_layout()
|
| 184 |
-
st.pyplot(fig)
|
|
|
|
| 61 |
|
| 62 |
slight_summary = summary[['mean', 'std', '25%', '50%', '75%', 'max']]
|
| 63 |
|
|
|
|
| 64 |
st.dataframe(slight_summary, use_container_width=True)
|
| 65 |
|
| 66 |
|
|
|
|
| 106 |
df_out["complexity_score"] = cs
|
| 107 |
df_out["complexity_rank"] = df_out["complexity_score"].rank(method="min", ascending=False).astype(int)
|
| 108 |
|
| 109 |
+
st.write("The following table represents the ontologies with complexity score and their ranking based on this score.")
|
| 110 |
st.dataframe(df_out, use_container_width=True)
|
| 111 |
|
| 112 |
|
|
|
|
| 160 |
# =====================
|
| 161 |
# CORRELATIONS
|
| 162 |
# =====================
|
| 163 |
+
st.subheader("📡 Domain-Wise Correlations")
|
| 164 |
|
| 165 |
domains = sorted(df["Domain"].unique())
|
| 166 |
n_domains = len(domains)
|
| 167 |
|
| 168 |
+
n_rows = 2
|
| 169 |
+
n_cols = math.ceil(n_domains / n_rows)
|
| 170 |
+
|
| 171 |
+
fig, axes = plt.subplots(n_rows, int(np.ceil(n_domains / 2)), figsize=(n_cols * 3.5, n_rows * 3.5))
|
| 172 |
axes = axes.flatten()
|
| 173 |
|
| 174 |
for i, dom in enumerate(domains):
|
| 175 |
sub = df[df["Domain"] == dom][metrics]
|
| 176 |
corr = sub.corr()
|
| 177 |
|
| 178 |
+
sns.heatmap(corr, cmap="coolwarm", square=True, cbar=False, linewidths=0.2,
|
| 179 |
xticklabels=False, yticklabels=False, ax=axes[i])
|
| 180 |
+
axes[i].set_title(dom, fontsize=13)
|
| 181 |
|
| 182 |
for j in range(i + 1, len(axes)):
|
| 183 |
axes[j].axis("off")
|
| 184 |
|
| 185 |
+
plt.tight_layout(rect=[0, 0, 1, 1])
|
| 186 |
plt.tight_layout()
|
| 187 |
+
st.pyplot(fig)
|