I have a feature that is boolean and I would like to feed it to a neural net as one of the inputs. I think in theory the best is to encode as false->0 and true->1 because 0 as an input will deactivate weights of a neuron. Is this correct?
-
$\begingroup$ Does this look similar to my question below datascience.stackexchange.com/questions/40955/… $\endgroup$ – feynman Nov 10 '18 at 14:18
-
$\begingroup$ @feynman No, this question was about normalizing inputs. $\endgroup$ – Manngo Nov 10 '18 at 21:49
Actually, it is not clear what you mean by deactivating but if it means the output of neuron would be zero, it is not correct due to having bias term, also known as intercept. Furthermore, we usually use normalisation for features which are of different scales. Your boolean values do not have a large range. You don't need to scale them. If I want to be more precise, you may need depending on the other features' range, because they may change slightly among different input patterns and vary less than let say 1e-5 for different samples, but most of the time, booleans are not needed to be scaled.
-
$\begingroup$ I understand the bias problem but I'm somewhat confused. Did you intend to say "but most of the time, booleans are not needed to be scaled."? Thank you! $\endgroup$ – Manngo May 28 '18 at 22:32
-
-
$\begingroup$ Is normalizing inputs similar to turning a gray pic into a binary colored pic? $\endgroup$ – feynman Nov 11 '18 at 9:26
-
$\begingroup$ @feynman not really. I didn't understand the last part of your question but the first part is not correct. Gray to binary means you are loosing information but in some cases it is not very important you loose extra information. For instance, for ocr tasks, gray-level images are more preferable than coloured due to a smaller number of calculations. $\endgroup$ – Media Nov 12 '18 at 20:13