Features¶
Feature Columns¶
SparseFeat¶
SparseFeat
is a namedtuple with signature SparseFeat(name, vocabulary_size, embedding_dim, use_hash, dtype, embeddings_initializer, embedding_name, group_name, trainable)
- name : feature name
- vocabulary_size : number of unique feature values for sprase feature or hashing space when
use_hash=True
- embedding_dim : embedding dimension
- use_hash : defualt
False
.IfTrue
the input will be hashed to space of sizevocabulary_size
. - dtype : default
int32
.dtype of input tensor. - embeddings_initializer : initializer for the
embeddings
matrix. - embedding_name : default
None
. If None, the embedding_name will be same asname
. - group_name : feature group of this feature.
- trainable: default
True
.Whether or not the embedding is trainable.
DenseFeat¶
DenseFeat
is a namedtuple with signature DenseFeat(name, dimension, dtype)
- name : feature name
- dimension : dimension of dense feature vector.
- dtype : default
float32
.dtype of input tensor.
VarLenSparseFeat¶
VarLenSparseFeat
is a namedtuple with signature VarLenSparseFeat(sparsefeat, maxlen, combiner, length_name, weight_name,weight_norm)
- sparsefeat : a instance of
SparseFeat
- maxlen : maximum length of this feature for all samples
- combiner : pooling method,can be
sum
,mean
ormax
- length_name : feature length name,if
None
, value 0 in feature is for padding. - weight_name : default
None
. If not None, the sequence feature will be multiplyed by the feature whose name isweight_name
. - weight_norm : default
True
. Whether normalize the weight score or not.
Models¶
DSSM (Deep Structured Semantic Model)¶
Deep Structured Semantic Models for Web Search using Clickthrough Data
SDM (Sequential Deep Matching Model)¶
SDM: Sequential Deep Matching Model for Online Large-scale Recommender System
MIND (Multi-Interest Network with Dynamic routing)¶
Multi-interest network with dynamic routing for recommendation at Tmall