title: Do scikit-learn classifiers automatically one-hot encode?
body: <p>I'm confused by the behavior of the fit methods for the scikit-learn classifiers. I'm preprocessing my array that identifies the classes such that they are one-hot encoded, e.g, the shape is (n_samples, n_classes).</p>
  
  <p>However, when I try to use algorithms like SVC or logistic regression, I get the following error: <code>ValueError: bad input shape (100, 3)</code>.</p>
  
  <p>Now in fairness, the documentation does indicate that the for <code>fit(X,y)</code>
  , y should be defined as follows: <code>y : array-like, shape (n_samples,)</code>. Additionally, if I just load the Iris data set, iris.target is also an array of length n_samples. </p>
  
  <p>My question is, does scikit-learn automatically one-hot encode the classes when I run an arbitrary classification algorithm? If so, it's not clear that the need to do that pre-processing step as a user has been obviated. I'm assuming that that must be the case, because my impression is that one-hot encoding yields better performance than incrementally ordering the classes. But maybe that assumption is also incorrect.</p>