Construct a Weighted Categorical Column
Use this when each of your sparse inputs has both an ID and a value. For example, if you're representing text documents as a collection of word frequencies, you can provide 2 parallel sparse input features ('terms' and 'frequencies' below).
column_categorical_weighted(categorical_column, weight_feature_key, dtype = tf$float32)
A categorical column created by
String key for weight values.
Type of weights, such as
A categorical column composed of two sparse features: one represents id, the other represents weight (value) of the id feature in that example.
dtypeis not convertible to float.