title: A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array
body: <p>Code goes as follows, I am trying to use training data for GBRT regression trees, same data works good for other classifiers but gives above error for GBRT. please help :</p>
  
  <pre><code>dataset = load_files('train')
  vectorizer = TfidfVectorizer(encoding='latin1')
  X_train = vectorizer.fit_transform((open(f).read() for f in dataset.filenames)) 
  assert sp.issparse(X_train)     
  print("n_samples: %d, n_features: %d" % X_train.shape)
  y_train = dataset.target
  def benchmark(clf_class, params, name):
      clf = clf_class(**params).fit(X_train, y_train)
  </code></pre>