Hi,
I’m starting to take my first steps with TensorFlow and trying to understand the division of columns into numeric and categorical in this example:
Could you explain me why columns: ‘n_siblings_spouses’ and ‘parch’ aren’t numeric?
(This is the part of the code in the example:)
CATEGORICAL_COLUMNS = ['sex', 'n_siblings_spouses', 'parch', 'class', 'deck',
'embark_town', 'alone']
NUMERIC_COLUMNS = ['age', 'fare']
feature_columns = []
for feature_name in CATEGORICAL_COLUMNS:
vocabulary = dftrain[feature_name].unique()
feature_columns.append(tf.feature_column.categorical_column_with_vocabulary_list(feature_name, vocabulary))
for feature_name in NUMERIC_COLUMNS:
feature_columns.append(tf.feature_column.numeric_column(feature_name, dtype=tf.float32))