Update visualization.py
Browse files- visualization.py +0 -13
visualization.py
CHANGED
@@ -219,19 +219,6 @@ def plot_posture(df, posture_scores, color='blue', anomaly_threshold=3):
|
|
219 |
return fig
|
220 |
|
221 |
|
222 |
-
# Function to create the correlation heatmap
|
223 |
-
def plot_correlation_heatmap(mse_embeddings, mse_posture, mse_voice):
|
224 |
-
data = np.vstack((mse_embeddings, mse_posture, mse_voice)).T
|
225 |
-
df = pd.DataFrame(data, columns=["Facial Features", "Body Posture", "Voice"])
|
226 |
-
corr = df.corr()
|
227 |
-
|
228 |
-
plt.figure(figsize=(10, 8), dpi=300)
|
229 |
-
|
230 |
-
heatmap = sns.heatmap(corr, annot=True, cmap='coolwarm', vmin=-1, vmax=1)
|
231 |
-
plt.title('Correlation Heatmap of MSEs')
|
232 |
-
plt.tight_layout()
|
233 |
-
return plt.gcf()
|
234 |
-
|
235 |
def plot_stacked_mse_heatmaps(mse_face, mse_posture, mse_voice, df, title="Combined MSE Heatmaps"):
|
236 |
plt.figure(figsize=(20, 6), dpi=300)
|
237 |
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(20, 8), sharex=True, gridspec_kw={'height_ratios': [1, 1, 1.2], 'hspace': 0})
|
|
|
219 |
return fig
|
220 |
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
def plot_stacked_mse_heatmaps(mse_face, mse_posture, mse_voice, df, title="Combined MSE Heatmaps"):
|
223 |
plt.figure(figsize=(20, 6), dpi=300)
|
224 |
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(20, 8), sharex=True, gridspec_kw={'height_ratios': [1, 1, 1.2], 'hspace': 0})
|