title: sklearn: get feature names after L1-based feature selection
body: <p><a href="https://stackoverflow.com/questions/14133348/show-feature-names-after-feature-selection">This question and answer</a> demonstrate that when feature selection is performed using one of scikit-learn's dedicated feature selection routines, then the names of the selected features can be retrieved as follows:</p>
  
  <pre><code>np.asarray(vectorizer.get_feature_names())[featureSelector.get_support()]
  </code></pre>
  
  <p>For example, in the above code, <code>featureSelector</code> might be an instance of <code>sklearn.feature_selection.SelectKBest</code> or <code>sklearn.feature_selection.SelectPercentile</code>, since these classes implement the <code>get_support</code> method which returns a boolean mask or integer indices of the selected features.</p>
  
  <p>When one performs <a href="http://scikit-learn.org/stable/modules/feature_selection.html#l1-based-feature-selection" rel="nofollow noreferrer">feature selection via linear models penalized with the L1 norm</a>, it's unclear how to accomplish this. <code>sklearn.svm.LinearSVC</code> has no <code>get_support</code> method and the documentation doesn't make clear how to retrieve the feature indices after using its <code>transform</code> method to eliminate features from a collection of samples. Am I missing something here?</p>