2

I have a dataset with numerical (continuous) and categorical variables. I want to fit an artificial neural network. To do so, I have transformed my categorical variables by using the 1-of-k method, so I now have a bunch of binary variables. I am using the Neuralnet package in R to fit my ANN model.

From a theoretical point of view: is there any problem by mixing the continuous and binary variables in the same model?

1-of-k method is explained below:

The dat set

 [1] Sweden
 [2] India

becomes

    Sweden    India
[1]    1       0
[2]    0       1
Kim
  • 21
  • 2
  • 1
    Neural networks are basically generalized linear models so there shouldn't be an issue theoretically. However, I would read the documentation to be sure it can handle your data as factors (if that's how it's laid out); otherwise, binary variables should be handled well by an ANN – Jon Mar 27 '17 at 23:10
  • @Jon, Thanks for your input. I am using 1-of-k method to avoid categorical data so I dont have factors in my model – Kim Mar 28 '17 at 14:30
  • 1
    No idea what `1-of-k` means. You may want to explain this in your post for readers such as myself. – Jon Mar 28 '17 at 15:29
  • @Jon I thought it was commonly known, sorry for that.. I have explained it now – Kim Mar 28 '17 at 16:31

0 Answers0