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

Edit reduction_dimension_2d.py

parent 76ec8b59
No related branches found
No related tags found
No related merge requests found
from sklearn.decomposition import PCA
def reduce_embeddings_2d(embeddings, n_components=2, random_state=42):
"""Réduit les embeddings à 2 dimensions avec PCA."""
pca = PCA(n_components=n_components, random_state=random_state)
return pca.fit_transform(embeddings)
\ No newline at end of file
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