tensorflow - 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.
解决方案
推荐阅读
- ignite - Apache Ignite 是否支持 SQL 模式下的强一致性?
- gatsby - Gatsby build/createPages:错误处理
- php - 如何在 Laravel 中为多个域设置会话 cookie?
- regex - “(?”的替代品
- python - 如何用常量替换 ndarray 中每一行的最后一个元素(或任何元素)?
- python - 为什么使用 pandas read_sql 使用 bigquery 时会出现性能问题?
- machine-learning - 使用交叉验证调整超参数和评估
- kotlin - 在 TeamCity Kotlin DSL 中定义 DockerSupportFeature 时如何访问 dockerRegistryId
- python - Sum 存储在字典中的 DF 列
- r - 从列表中提取 data.frame 的循环