shenweichen / DeepCTR

Easy-to-use,Modular and Extendible package of deep-learning based CTR models .
https://deepctr-doc.readthedocs.io/en/latest/index.html
Apache License 2.0
7.57k stars 2.21k forks source link

lbe = HashEncoder() #266

Closed chen849157649 closed 4 years ago

chen849157649 commented 4 years ago

HashEncoder()哪个包导入的, for feat in sparse_features: lbe = HashEncoder() data[feat] = lbe.transform(data[feat]) 同样的字符串两次编码后值相同吗?,此方法在预测时能否使用?望解答,谢谢老师

shenweichen commented 4 years ago

HashEncoder()只是一个例子,并不是一个具体的函数。 deepctr里也有提供这个功能,在定义SparseFeat时设置use_hash=True就可以。具体的可以参考文档 https://deepctr-doc.readthedocs.io/en/latest/Features.html#sparsefeat