title: Number of components Trucated SVD
body: <p>One can reduce dimensionality by using truncated SVD. It performs linear dimensionality reduction by means of truncated singular value decomposition (SVD). However, one has to choose the number of components before decomposing. </p>
  
  <pre><code>n_comp = 25
  tfidf_vec = TfidfVectorizer(analyzer="word", max_features=5000, ngram_range=(1,2))
  svd = TruncatedSVD(n_components=n_comp, algorithm='arpack')
  tfidf_df = tfidf_vec.fit_transform(values)
  df = svd.fit_transform(tfidf_df)
  </code></pre>
  
  <p>How to choose the number of components ?</p>