[英]Tensorflow feature engineering for Boolean types
My dataset (CSV format) contains a boolean type (0 or 1) When I'm defining my features in Tensorflow I have been defining float64 as tf.contrib.layers.real_valued_column
. 我的数据集(CSV格式)包含一个布尔类型(0或1),当我在Tensorflow中定义要素时,我已经将float64定义为
tf.contrib.layers.real_valued_column
。
salesPercentile 333919 non-null float64
Using real_valued_column
: 使用
real_valued_column
:
sales_percentile = tf.contrib.layers.real_valued_column('sales_percentile')
What option do I have for boolean types? 我对布尔类型有什么选择?
nationBestSeller 333919 non-null bool
localBestSeller 333919 non-null bool
real_valued_column should handle the bool too. real_valued_column也应该处理布尔值。 since for the network it's a float value (one or zero)
因为对于网络来说,它是一个浮点值(一个或零)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.