Created
August 31, 2023 13:38
-
-
Save abhijeet-talaulikar/022560de00454f2d9ddfa02f83c96949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import matplotlib | |
matrix = clean_data['ada_embedding'].to_list() | |
# Create a t-SNE model and transform the data | |
tsne = TSNE(n_components=2, perplexity=15, random_state=42, init='random', learning_rate=200) | |
vis_dims = tsne.fit_transform(matrix) | |
x = [x for x,y in vis_dims] | |
y = [y for x,y in vis_dims] | |
plt.figure(figsize=(20,10)) | |
plt.scatter(x, y, alpha=0.3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment