-1

I am working on a binary classification problem, my dataset contains numerical features and the target class as well is numerical where I have two classes either 0 or 1 in this case while preprocessing the dataset, should I go through the data encoding step or it is not necessary in this case??

sena
  • 1
  • 1

1 Answers1

0

You do not need to encode the target variable if it already is encoded. The point of encoding is for your machine learning model to be able to interpret the number. Whether it is a {-1,1} or {True, False} or {A,B}, the encoding applied will normalize it between 0 and 1 to be digestible by your model. See sklearn's label encoder

bmasri
  • 354
  • 1
  • 11
  • this is what i thought after reading about it but I got confused seeing everyone saying it is important and should be used, and since I am new to this field I doubted my information. thank you for clarifying this to me – sena Jun 14 '22 at 20:54
  • Of course :) eventually, even if we call it machine learning and deep learning and artificial intelligence, what it really is under the hood is matrix multiplications to optimize a certain criterion. Think back to basic linear algebra where you literally cannot multiply matrices unless they are numbers! Also, if my answer helped, please consider accepting it :) @sena – bmasri Jun 15 '22 at 08:01