返回信息流lz自己面试时候遇到的,现在有几千万京东商城的用户检索商品的query,无label,现在需要对这些query做一个聚类。各位有什么思路吗?从vanilla到fancy的都可以说说
这是一条镜像帖。来源:北邮人论坛 / ml-dm / #27657同步于 2018/1/7
该镜像源已超过 30 天没有更新,可能在源站已被删除。
ML_DM机器人发帖
来讨论一条京东的面试题
jaegerstar
2018/1/7镜像同步17 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
没接触过这方面,随便抛个砖等大神
query为词,用户搜索记录为句子,按时间顺序排列。然后word2vec训下,跑个bottom-top hierachical clustering
当时这样说了,面试官不满意
【 在 viredery 的大作中提到: 】
: 没接触过这方面,随便抛个砖等大神
: query为词,用户搜索记录为句子,按时间顺序排列。然后word2vec训下,跑个bottom-top hierachical clustering
抛砖引玉。
楼主你的问题描述的不是很清晰,query是一个词还是一个短文本还是说都存在。另外聚类的目的是什么。。
比较naive的方式就是训练一个word2vec了,可以用维基百科的中文数据做训练语料。当然短文本的可以使用 word_embedding * tfidf_weight的方式加权求和
单纯的聚类确实没有其他特征可以做了。但我猜想面试官的问题应该想根据query进行商品推荐,那么就可以吧JD的商品标签考虑进来了,计算出每个标签的embedding然后计算标签和query的相似度。也就是类似K近邻的方式找到每个query所属的标签
当时面试官也没说query是短文本还是词,但是联想实际场景可知这两种都是可能存在的所以一定程度的数据预处理是必须的。感觉当时面试官是想让我说fancy一点的方法
【 在 John11 的大作中提到: 】
: 抛砖引玉。
:
: 楼主你的问题描述的不是很清晰,query是一个词还是一个短文本还是说都存在。另外聚类的目的是什么。。
1. For each query, there is a search result doc distribution, click logs, etc. You can get the query similarities by comparing their corresponding document distribution. A typical search engine should have such a well maintained query similarity data sets and there should be a lot of ideas here.
2. From (1), you can get accurate similarities for head queries. Then you can design a natural language model to compute the similarities of queries by looking at their words. You can use whatever fancy models here to get the query representations...
老铁在哪复制的
【 在 charnugagoo 的大作中提到: 】
: 1. For each query, there is a search result doc distribution, click logs, etc. You can get the query similarities by comparing their corresponding document distribution. A typical search engine should have such a well maintained query similarity data sets and there should be a lot of ideas here.
: 2. From (1), you can get accurate similarities for head queries. Then you can design a natural language model to compute the similarities of queries by looking at their words. You can use whatever fancy models here to get the query representations...
根据query下面对应的商品,每个query就成了一个向量,然后利用kmeans计算欧式距离进行聚类即可。
【 在 jaegerstar 的大作中提到: 】
: lz自己面试时候遇到的,现在有几千万京东商城的用户检索商品的query,无label,现在需要对这些query做一个聚类。各位有什么思路吗?从vanilla到fancy的都可以说说