title: Input length mismatch scikit
body: <p>I'm trying to use a <code>DecisionTreeClassifier</code> to do some analysis but it is giving me the following error:</p>
  
  <p><code>ValueError: Number of features of the model must  match the input. Model n_features is 1 and  input n_features is 4</code></p>
  
  <p>I've used the same training and test sets for an <code>SVC</code> and a <code>GaussianNB</code> classifier and those both worked fine. Below is my code, I know the test and training set have the same design, that is, before being vectorized they take the form of a list containing strings. I don't know where the mismatch is coming from</p>
  
  <pre><code>#classify with just scikit
  
  from sklearn.feature_extraction.text import TfidfVectorizer
  from tools.striper import stripe, cleanupfiles
  from tools.tweetprocessor import clean, wordclean
  
  from sklearn import svm
  from sklearn.naive_bayes import GaussianNB, MultinomialNB
  from sklearn.metrics import classification_report
  from sklearn import tree
  
  stripe(0.1)
  
  training = []
  traininglabel = []
  test = []
  testlabel = []
  
  with open('tempdata/goodtraining.txt','r') as f:
      for line in f:
          tweet = [wordclean(x) for x in clean(line.rstrip('\n')).split()]
          tweet = [x for x in tweet if len(x) &gt;= 3]
          training.append(' '.join(tweet))
          traininglabel.append('good')
  with open('tempdata/badtraining.txt','r') as f:
      for line in f:
          tweet = [wordclean(x) for x in clean(line.rstrip('\n')).split()]
          tweet = [x for x in tweet if len(x) &gt;= 3]
          training.append(' '.join(tweet))
          traininglabel.append('bad')
  with open('tempdata/goodtest.txt','r') as f:
      for line in f:
          tweet = [wordclean(x) for x in clean(line.rstrip('\n')).split()]
          test.append(' '.join(tweet))
          testlabel.append('good')
  with open('tempdata/badtest.txt','r') as f:
      for line in f:
          tweet = [wordclean(x) for x in clean(line.rstrip('\n')).split()]
          test.append(' '.join(tweet))
          testlabel.append('bad')
  
  vectorizer = TfidfVectorizer(min_df=0.1,max_df=0.9)
  train_vect = vectorizer.fit_transform(training)
  test_vect = vectorizer.fit_transform(test)
  
  print (train_vect)
  print (test_vect)
  
  classifier = tree.DecisionTreeClassifier()
  classifier.fit(train_vect.toarray(), traininglabel)
  predictions = classifier.predict(test_vect.toarray())
  
  print (classification_report(testlabel, predictions))
  
  cleanupfiles()
  </code></pre>