title: Correct Encoding for Classification (label)
body: <p>I'm putting data into a randomforest classifier. </p>
  
  <pre><code>#create bins for interval measures
  n = 0
  interval_length = 30
  bins = []
  
  while interval_length*n &lt; interval_length + features['Cycle Time'].max():
      x = interval_length*n
      bins.append(x)
      n = n+1
  
  features["Cycle Time Interval"] = pd.cut(features['Cycle Time'], bins)
  </code></pre>
  
  <p>I run my model:</p>
  
  <pre><code>clf = RandomForestClassifier()
  clf.fit(features_encoded, features["Cycle Time Interval"])
  </code></pre>
  
  <p>And get this error:</p>
  
  <pre><code>TypeError: float() argument must be a string or a number, not 'pandas._libs.interval.Interval'
  </code></pre>
  
  <p>It seems that the classifer doesn't like predicting the 'Cycle Time Interval' because of it's type (category).</p>
  
  <p>Suggestions on encoding options or other solutions?</p>