我遇到了这两篇结合协同过滤(矩阵分解)和主题建模(LDA)的论文,根据用户感兴趣的帖子/文章的主题术语向用户推荐相似的文章/帖子。
论文(PDF)是: “ Collaborative Topic Modeling for Recommending Scientific Articles ”和 " Collaborative Topic Modeling for Recommending GitHub Repositories "
新算法称为协作主题回归。我希望找到一些实现这一点的python代码,但无济于事。这可能是一个很长的镜头,但有人可以展示一个简单的 python 示例吗?
最佳答案
这应该可以帮助您入门(尽管不确定为什么尚未发布):https://github.com/arongdari/python-topic-model
更具体地说:https://github.com/arongdari/python-topic-model/blob/master/ptm/collabotm.py
class CollaborativeTopicModel:
"""
Wang, Chong, and David M. Blei. "Collaborative topic
modeling for recommending scientific articles."
Proceedings of the 17th ACM SIGKDD international conference on Knowledge
discovery and data mining. ACM, 2011.
Attributes
----------
n_item: int
number of items
n_user: int
number of users
R: ndarray, shape (n_user, n_item)
user x item rating matrix
"""
看起来漂亮而简单。我仍然建议至少看看 gensim
。 Radim 在优化该软件方面做得非常出色。
关于python - 协作主题建模的简单 Python 实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32215827/