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).
This assumes the input dictionary contains a SparseTensor for key
'terms', and a SparseTensor for key 'frequencies'. These 2 tensors must have
the same indices and dense shape.
Args
categorical_column
A CategoricalColumn created by
categorical_column_with_* functions.
weight_feature_key
String key for weight values.
dtype
Type of weights, such as tf.float32. Only float and integer weights
are supported.
Returns
A CategoricalColumn composed of two sparse features: one represents id,
the other represents weight (value) of the id feature in that example.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]