title: Remove a specific feature in scikit learn
body: <p>Is there any way to remove a specific feature out of a <code>scikit.learn</code> dataset? For example, I know it is possible to remove features using <code>sklearn.feature_selection</code>, but these are all automated procedures removing features <em>they</em> decide are useless. Is there any way to implement a custom feature removal algorithm without going into the dirty insides of the data? For example, say I have a function that scores features, a toy example provided here:</p>
  
  <pre><code>def score(feature_index):
      return 0 if feature_index == 1 else 1
  </code></pre>
  
  <p>Now say I want to remove all those features in the iris dataset that score less than <code>0.5</code>. I want to do something like this:</p>
  
  <pre><code>from sklearn import datasets
  iris = datasets.load_iris()
  #this is the function I want:
  iris.filter_features(score, threshold=0.5)
  </code></pre>
  
  <p>after which I would like the iris dataset to have one less feature. Right now, I can do it like so:</p>
  
  <pre><code>from sklearn import datasets
  iris = datasets.load_iris()
  for feature_index in range(len(iris.feature_names)):
      if score(feature_index) &lt; 0.5:
          iris.feature_names.pop(feature_index)
          iris.data = np.delete(iris.data, feature_index, 1)
  </code></pre>
  
  <p>but this looks... dirty.</p>