I am trying to understand a code block from a guided tutorial for the classic Iris Classification problem.
The code block for the final model is given as follows
chosen_model = SVC(gamma='auto')
chosen_model.fit(X_train,Y_train)
predictions = chosen_model.predict(X_valid)
In this image you can see the data types present in X_train and Y_train. These are Numpy arrays. Y_train contains the Iris species as string.
My question is simple: how come the model works even though I haven't One-Hot Encoded Y_train into different binary columns? My understanding from other tutorials is that for multi-class classification I need to first do one-hot encoding.
The code is working fine, I want to grasp when I need to One-Hot Encode and when it's not needed. Thank you!