Reputation: 11
While running ANN model using R "Can we use catagorical variable as input in ANN model".
Upvotes: 0
Views: 842
Reputation: 7111
Not directly. Even if you could, it wouldn't have a whole lot of meaning. The power in an ANN comes from its ability to approximate any function to any desired degree of accuracy, coupled with a bias toward "simple" functions (the simple bit being proven fairly recently). This allows effective interpolation in your data.
Even if you encode your categorical data into numerical values, the ANN is likely to have a hard time generalizing from that data because on average a random encoding of categorical data is not a simple function. This can be partially mitigated with something like a one-hot encoding which would remove a lot of the ordering bias that can occur in quantifying categorical data, but as a rule of thumb neural networks are not the best tool for the job.
Random forests and other related methods typically do an excellent job with categorical data, and at least as a baseline I would probably start there. Many implementations have the advantage that you can mix categorical and continuous features, allowing for excellent flexibility.
Upvotes: 1