title: I'm seeing a type error I can't seem to solve when using sklearn
body: <p>I bet this is a simple fix for someone but I'm racking my brain and can't seem to find the answer... Let's start with my code:</p>
  <pre><code>    # -*- coding: utf-8 -*-
  &quot;&quot;&quot;
  Spyder Editor
  
  &quot;&quot;&quot;
  import pandas
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.metrics import classification_report
  import sklearn.metrics
  import os
  
  os.chdir(&quot;..&quot;)
  
  # Set Display options
  pandas.set_option('display.max_columns', None)
  pandas.set_option('display.max_rows', None)
  
  # Read in the Mars Crater Data
  print(&quot;reading data set...&quot;)
  data = pandas.read_csv('marscrater2_pds.csv', low_memory=(False))
  print(&quot;cleaning data...&quot;)
  data_clean = data.dropna()
  data_clean['DIAM_CIRCLE_IMAGE'] = pandas.to_numeric(data_clean['DIAM_CIRCLE_IMAGE'], downcast=&quot;float&quot;)
  data_clean['DEPTH_RIMFLOOR_TOPOG'] = pandas.to_numeric(data_clean['DEPTH_RIMFLOOR_TOPOG'], downcast=&quot;float&quot;)
  data_clean['LATITUDE_CIRCLE_IMAGE'] = pandas.to_numeric(data_clean['LATITUDE_CIRCLE_IMAGE'], downcast=&quot;float&quot;)
  data_clean['LONGITUDE_CIRCLE_IMAGE'] = pandas.to_numeric(data_clean['LONGITUDE_CIRCLE_IMAGE'], downcast=&quot;float&quot;)
  data_clean['NUMBER_LAYERS'] = pandas.to_numeric(data_clean['NUMBER_LAYERS'], downcast=&quot;integer&quot;)
  
  
  print(&quot;analysing data types...&quot;)
  data_clean.dtypes
  data_clean.describe()
  
  print(&quot;setting predictors...&quot;)
  predictors = data_clean[['LATITUDE_CIRCLE_IMAGE', 'LONGITUDE_CIRCLE_IMAGE',
                           'DIAM_CIRCLE_IMAGE', 'NUMBER_LAYERS']]
  
  print(&quot;setting target(s)...&quot;)
  targets = data_clean[&quot;DEPTH_RIMFLOOR_TOPOG&quot;]
  
  print(&quot;setting test splits...&quot;)
  pred_train, pred_test, tar_train, tar_test = train_test_split(predictors, targets, test_size=0.4)
  
  
  print(&quot;shaping test splits...&quot;)
  pred_train.shape
  pred_test.shape
  tar_train.shape
  tar_test.shape
  
  print(&quot;setting classifier...&quot;)
  classifier=DecisionTreeClassifier()
  classifier=classifier.fit(pred_train, tar_train)
  
  print(&quot;setting up prediction...&quot;)
  predictions=classifier.predict(pred_test)
  print(&quot;building model...&quot;)
  sklearn.metrics.confusion_matrix(tar_test,predictions)
  </code></pre>
  <p>.. I am getting the following error:</p>
  <blockquote>
  <p>runfile('C:/Users//Documents/Training/IT Nano - Data
  Analyst/Machine Learning/ML (Week 1).py',
  wdir='C:/Users//Documents/Training/IT Nano - Data
  Analyst/Machine Learning') reading data set... cleaning data...
  analysing data types... setting predictors... setting target(s)...
  setting test splits... shaping test splits... setting classifier...
  Traceback (most recent call last):</p>
  <p>File &quot;C:\Users&lt;username&gt;\Documents\Training\IT Nano - Data
  Analyst\Machine Learning\ML (Week 1).py&quot;, line 58, in 
  classifier=classifier.fit(pred_train, tar_train)</p>
  <p>File
  &quot;C:\Users&lt;username&gt;\Anaconda3\lib\site-packages\sklearn\tree_classes.py&quot;,
  line 890, in fit
  super().fit(</p>
  <p>File
  &quot;C:\Users&lt;username&gt;\Anaconda3\lib\site-packages\sklearn\tree_classes.py&quot;,
  line 181, in fit
  check_classification_targets(y)</p>
  <p>File
  &quot;C:\Users&lt;username&gt;\Anaconda3\lib\site-packages\sklearn\utils\multiclass.py&quot;,
  line 172, in check_classification_targets
  raise ValueError(&quot;Unknown label type: %r&quot; % y_type)</p>
  <p>ValueError: Unknown label type: 'continuous'</p>
  </blockquote>