title: Why am I getting this error in Python ML model?
body: <p>I face no problems in importing the dataset. However, when I run SMOTE or RandomUnderSampler I get the error (however, only in this dataset I face this problem not with others). I cannot even make out which column/field the error is pointing at. Is there any change or tweaking I need to do in the parameters for SMOTE/RUS?</p>
  <pre><code>#Smote
  sm = SMOTE(random_state = 2, k_neighbors= 8) 
  X_train_sm, y_train_sm = sm.fit_resample(X_train.values, y_train)
  
  X_train_rm = X_train_sm
  y_train_rm = y_train_sm
  
  #RandomUnderSampler
  rus = RandomUnderSampler(
  sampling_strategy = 'auto',
  random_state= 0,
  replacement = True)
  X_train_rus, y_train_rus = rus.fit_resample(X_train.values, y_train)
  </code></pre>
  <p>Error</p>
  <pre><code>Traceback (most recent call last)
  &lt;ipython-input-28-b68eb88feabe&gt; in &lt;module&gt;
    5 random_state= 0,
    6 replacement = True)
   ----&gt; 7 X_train_rus, y_train_rus = rus.fit_resample(X_train.values, y_train)
    8 
    9 X_train_rm = X_train_rus
  
   ~\Anaconda3\lib\site-packages\imblearn\base.py in fit_resample(self, X, y)
   73             The corresponding label of `X_resampled`.
   74         &quot;&quot;&quot;
   ---&gt; 75         check_classification_targets(y)
   76         arrays_transformer = ArraysTransformer(X, y)
   77         X, y, binarize_y = self._check_X_y(X, y)
  
   ~\Anaconda3\lib\site-packages\sklearn\utils\multiclass.py in check_classification_targets(y)
  167     y : array-like
  168     &quot;&quot;&quot;
  --&gt; 169     y_type = type_of_target(y)
  170     if y_type not in ['binary', 'multiclass', 'multiclass-multioutput',
  171                       'multilabel-indicator', 'multilabel-sequences']:
  
  ~\Anaconda3\lib\site-packages\sklearn\utils\multiclass.py in type_of_target(y)
  288         return 'continuous' + suffix
  289 
  --&gt; 290     if (len(np.unique(y)) &gt; 2) or (y.ndim &gt;= 2 and len(y[0]) &gt; 1):
  291         return 'multiclass' + suffix  # [1, 2, 3] or [[1., 2., 3]] or [[1, 2]]
  292     else:
  
  &lt;__array_function__ internals&gt; in unique(*args, **kwargs)
  
   ~\Anaconda3\lib\site-packages\numpy\lib\arraysetops.py in unique(ar, return_index, return_inverse, 
   return_counts, axis)
   261     ar = np.asanyarray(ar)
   262     if axis is None:
   --&gt; 263         ret = _unique1d(ar, return_index, return_inverse, return_counts)
   264         return _unpack_tuple(ret)
   265 
  
   ~\Anaconda3\lib\site-packages\numpy\lib\arraysetops.py in _unique1d(ar, return_index, 
    return_inverse, return_counts)
    309         aux = ar[perm]
    310     else:
    --&gt; 311         ar.sort()
    312         aux = ar
    313     mask = np.empty(aux.shape, dtype=np.bool_)
    TypeError: '&lt;' not supported between instances of 'float' and 'str'
  </code></pre>