Skip to content
Snippets Groups Projects
Commit dd8c1793 authored by MAFTOUH Mohammed Amine's avatar MAFTOUH Mohammed Amine
Browse files

Add new file

parent 0b6504a1
No related branches found
No related tags found
No related merge requests found
import matplotlib.pyplot as plt
def visualize_clusters(embeddings_2d, cluster_labels, title="Clusters visualisés en 2D"):
"""Affiche les clusters en 2D avec un scatter plot."""
plt.figure(figsize=(10, 8))
plt.scatter(embeddings_2d[:, 0], embeddings_2d[:, 1], c=cluster_labels, cmap='viridis', alpha=0.7)
plt.title(title)
plt.xlabel('Dimension 1')
plt.ylabel('Dimension 2')
plt.colorbar(label='Cluster')
plt.grid(True)
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment