DeepCTR
DeepCTR copied to clipboard
meaning of history_feature_list, self.history_feature_columns, self.sparse_varlen_columns
I have some questions about DIN parameters.
In the parameter description, history_feature_list indicate sequence sparse field, in your example code, it was ['item', 'item_gender']. So, self.history_fc_name = ['hist_item', 'hist_item_gender'].
In def init(self, ...): ...
for fc in self.varlen_sparse_feature_columns:
feature_name = fc.name
if feature_name in self.history_fc_names:
self.history_feature_columns.append(fc)
else:
self.sparse_varlen_feature_columns.append(fc)
... From this code, as I understood, self.history_feature_columns contains varlensparsefeats in history_feature_list and self.sparse_varlen_feature_columns contains varlensparsefeats not in history_feature_list. I want to know there is varlensparsefeats that will be in self.sparse_varlen_feature_columns. In your example code self.sparse_varlen_feature_columns is empty. what is the meaning of self.sparse_varlen_feature_columns in the algorithm?
self.sparse_varlen_feature_columns includes faetures that are not belong history behavior sequence but are varlen.
for example the tags that user liked are sparse_varlen_feature