im commited on
Commit
a6a7ec1
1 Parent(s): c6b74a4

add embeddings explanation and dimensionality reduction explanation

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -745,6 +745,7 @@ elif dimensionality_name == 'PCA':
745
 
746
  st.code(f"""\
747
  from sklearn.decomposition import PCA
 
748
 
749
  pca = PCA(n_components=2)
750
  embedding_matrix = np.array(list(embeddings.values()))
@@ -803,6 +804,7 @@ elif dimensionality_name == 't-SNE':
803
 
804
  st.code(f"""\
805
  from sklearn.manifold import TSNE
 
806
 
807
  tsne = TSNE(n_components=2, perplexity=2, random_state=0)
808
  embedding_matrix = np.array(list(embeddings.values()))
 
745
 
746
  st.code(f"""\
747
  from sklearn.decomposition import PCA
748
+ import numpy as np
749
 
750
  pca = PCA(n_components=2)
751
  embedding_matrix = np.array(list(embeddings.values()))
 
804
 
805
  st.code(f"""\
806
  from sklearn.manifold import TSNE
807
+ import numpy as np
808
 
809
  tsne = TSNE(n_components=2, perplexity=2, random_state=0)
810
  embedding_matrix = np.array(list(embeddings.values()))