首页 > 解决方案 > Tensorflow / Keras categorical encoding

问题描述

I have a question regarding the category encoding in keras/tensorflow. In the example: https://www.tensorflow.org/tutorials/structured_data/preprocessing_layers

in this example a categorical encoding is performed: https://www.tensorflow.org/tutorials/structured_data/preprocessing_layers#categorical_columns

Here the two categories cat or dog are mapped into four dummy variables. Why are four and not two variables needed for this? I have the same problem with my applications.

标签: tensorflowkeras

解决方案


推荐阅读