3

In regression, you encode a categorical variable with n possible values using n-1 indicator variables. How about for neural networks?

JenSCDC
  • 1,047
  • 7
  • 17

1 Answers1

5

You do the same. Although people use $n$ instead of $n-1$ more often, which is probably just a matter of style.

bayerj
  • 12,735
  • 3
  • 35
  • 56
  • Why? I'm just starting to learn neural networks, and so far I haven't read about anything that's the equivalent of the intercept in regression. – JenSCDC Jun 24 '14 at 20:40
  • 1
    The intercept is often called bias in neural network texts. – bayerj Jun 25 '14 at 10:03
  • Obviously I still have a good deal to learn about neural networks. – JenSCDC Jun 25 '14 at 13:33
  • I don't think it is only *a matter of style*. See my answer https://stats.stackexchange.com/questions/231285/dropping-one-of-the-columns-when-using-one-hot-encoding/329281#329281 – kjetil b halvorsen Jul 25 '19 at 16:06