GitHub-HongweiZhang / prediction-flow

Deep-Learning based CTR models implemented by PyTorch
MIT License
250 stars 52 forks source link

attendance one key and many values #21

Open liuchenailq opened 4 years ago

liuchenailq commented 4 years ago

pairs=[{'ad': 'q_topic_1', 'pos_hist': 'm_interested_topics'}, {'ad': 'q_topic_2', 'pos_hist': 'm_interested_topics'}, {'ad': 'q_topic_3', 'pos_hist': 'm_interested_topics'}, {'ad': 'q_topic_4', 'pos_hist': 'm_interested_topics'}, {'ad': 'q_topic_5', 'pos_hist': 'm_interested_topics'} ],

GitHub-HongweiZhang commented 4 years ago

Thank you very much. I will consider your request this week!

GitHub-HongweiZhang commented 4 years ago

@liuchenailq

Could you give more info about why do you need such feature. What is the situation? If you can give an example data set, it is very helpful.

From your example, the attention score of m_interested_topics seems need to be summarized using avg func. Is it right?

liuchenailq commented 4 years ago

thanks very much.

in my scene, a user have some topics, a goods have some topics. So I want to the attention score of goods topics in every user topics.

for example. user have topics [T1, T2, T3], goods have topics [T10, T11, T14]. I want to do pairs=[{'ad': 'T1', 'pos_hist': 'goods_topics'}, {'ad': 'T2', 'pos_hist': 'goods_topics'}, {'ad': 'T3', 'pos_hist': 'goods_topics'}, ],

thanks again