allRank icon indicating copy to clipboard operation
allRank copied to clipboard

Embeddings

Open vitalyli opened this issue 1 year ago • 0 comments

Anybody tried to use in-line trained embeddings? Not all columns are simple numerics. For categoricals or numerics where using bucketization may lead to better learned representation; using NxM embedding matrix for some features can be helpful. In Tensorflow it can be done using these helpers:

bucketized_col1 = tf.feature_column.bucketized_column(tf.feature_column.numeric_column(key='col1', shape=[1,], default_value=-2, dtype=tf.int64), boundaries=[1,3,4,5,10,14,18,27,52,61,79]) feature_columns["col1_emb"] = tf.feature_column.embedding_column(bucketized_col1, 5)

vitalyli avatar Mar 12 '24 04:03 vitalyli