Artificial Intelligence, Machine Learning, Python, Data Science, Deep Learning.
min=1e-9) mean_pooled = sum_embeddings / sum_mask # Reduce dimensionality with PCA pca = PCA(n_components=2) embeddings_reduced = pca.fit_transform(mean_pooled) # Plot the embeddings plt.figure(figsize=(10, 7)) plt.scatter(embeddings_reduced[:, 0], embeddings_reduced[:, 1]) for i, sentence in