title: NameError: name 'tree' is not defined
body: <p>Hey I'm new to Python and I am trying to follow along with a tutorial but I get this error: </p>
  
  <blockquote>
    <p>NameError: name 'tree' is not defined.</p>
  </blockquote>
  
  <p>The objective is obviously for the program to determine whether the fruit is an apple or orange based on the input of features. I'm using Python 3.6 with the spyder editor on Win 10. I'm sure it's something simple, thanks for any help!</p>
  
  <pre><code># -*- coding: utf-8 -*-
  """
  Spyder Editor
  
  This is a temporary script file.
  """
  
  # features = [[140, "smooth"], [130, "smooth"], [150, "bumpy"], [170, "bumpy"]]
  # labels = ["apple", "apple", "orange", "orange"]
  features = [[140, 1], [130, 1], [150, 0], [170, 0]]
  labels = [0, 0, 1, 1]
  # We build a "Decision Tree" yes/no -&gt; yes/no
  # clf means classifier
  clf = tree.DecisionTreeClassifier()
  # Think of "fit" as "find patters in data"
  clf = clf.fit(features, labels)
  print (clf.predict([[160, 0]]))
  </code></pre>