nullUser
nullUser

Reputation: 11

Do we need to scale categorical variable when applying SVM?

I was reading A Practical Guide to Support Vector Classification by Chih-Wei Hsu to try and make my SVM and decision tree run faster and he mentioned that scaling the data before performing SVM is important. I have dataset with 25 columns and one columns is type factor when I tried to scale the data I got error saying that column x must be numeric, when I converted the factor column into numeric the scale function worked.

Will converting categorical variable to numeric and scaling it affect my result negatively?

Upvotes: 0

Views: 709

Answers (1)

Mohamed Desouky
Mohamed Desouky

Reputation: 4425

It is not a good idea to scale categorical variables, The best practice with it is to use encoding with one-hot-encoding method which returns 0's or 1's for each category .

Upvotes: 0

Related Questions