MrKickass
MrKickass

Reputation: 113

Choosing which variables to normalize while applying logistic regression

Suppose a dataset comprises independent variables that are continuous and binary variables. Usually the label/outcome column is converted to a one hot vector, whereas continuous variables can be normalized. But what needs to be applied for binary variables.

AGE       RACE  GENDER  NEURO   EMOT
15.95346    0    0       3       1
14.57084    1    1       0       0
15.8193     1    0       0       0
15.59754    0    1       0       0

How does this apply for logistic regression and neural networks?

Upvotes: 1

Views: 178

Answers (1)

Arjun
Arjun

Reputation: 325

If the range of continuous value is small, encode it into a binary form and use each bit of that binary form as a predictor. For example, number 2 = 10 in binary. Therefore

predictor_bit_0 = 0

predictor_bit_1 = 1

Try and see if it works. Just to warn you, this method is very subjective and may or may not yield good results for your data. I'll keep you posted if I find a better solution

Upvotes: 1

Related Questions