gogasca
gogasca

Reputation: 10058

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.

salesPercentile                  333919 non-null float64

Using 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

Upvotes: 0

Views: 735

Answers (1)

user1454804
user1454804

Reputation: 1080

real_valued_column should handle the bool too. since for the network it's a float value (one or zero)

Upvotes: 1

Related Questions