-1

This is the code I used

svmclassifier = SVC(kernel = "rbf",random_state=0)
svmclassifier.fit(x_train,y_train)

And this is the error: https://i.stack.imgur.com/9QonD.png

desertnaut
  • 57,590
  • 26
  • 140
  • 166
  • Welcome to SO. Please **re-read** [How to ask](https://stackoverflow.com/help/how-to-ask), as it would seem that you missed some crucial points the first time you read it, namely "***DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question*" (emphasis in the original). – desertnaut Aug 26 '21 at 07:56

1 Answers1

0

this issue is always related to what is the type of your target y_train. It should always be in integer or you can encode the target using LabelEncoder()

Mohamed Afify
  • 160
  • 1
  • 8