title: Sparse Principal Component Analysis using sklearn
body: <p>I'm trying to replicate an application from this <a href="https://people.eecs.berkeley.edu/~elghaoui/Pubs/SPCAhandbookSV.pdf" rel="nofollow noreferrer">paper</a>, where the authors download the <a href="http://scikit-learn.org/stable/datasets/twenty_newsgroups.html" rel="nofollow noreferrer">20 newsgroups</a> data and use SPCA to extract the principal components that in some sense best describe the text corpus [see section 4.1]. This is for a high dimensions class project where we were asked to pick a topic and replicate/apply it.</p>
  
  <p>The output should be K principal components, which each have a short list of words that all intuitively correspond to a certain theme (for example, the paper finds the first PC is all about politics and religion).</p>
  
  <p>From my research it seems like the best way to reproduce the application from this paper is using this algorithm: <code>sklearn.decomposition.MiniBatchSparsePCA</code>.</p>
  
  <p>I have found only one example of how this alogrithm works, <a href="http://scikit-learn.org/stable/auto_examples/decomposition/plot_faces_decomposition.html#sphx-glr-auto-examples-decomposition-plot-faces-decomposition-py" rel="nofollow noreferrer">here</a>. </p>
  
  <p>So my question is this: Is it, in principal, possible to follow the steps in the above linked example, using text data to reproduce the application from section 4.1 in the paper linked in the first paragraph?</p>
  
  <p>If it is, I would then be able to ask more concrete question regarding the code.</p>