I came across these 2 papers which combined collaborative filtering (Matrix factorization) and Topic modelling (LDA) to recommend users similar articles/posts based on topic terms of post/articles that users are interested in.
The papers (in PDF) are: "Collaborative Topic Modeling for Recommending Scientific Articles" and "Collaborative Topic Modeling for Recommending GitHub Repositories"
The new algorithm is called collaborative topic regression. I was hoping to find some python code that implemented this but to no avail. This might be a long shot but can someone show a simple python example?
Linear Discriminant Analysis, or LDA for short, is a classification machine learning algorithm. It works by calculating summary statistics for the input features by class label, such as the mean and standard deviation. These statistics represent the model learned from the training data.
Topic modeling is a type of statistical modeling for discovering the abstract “topics” that occur in a collection of documents. Latent Dirichlet Allocation (LDA) is an example of topic model and is used to classify text in a document to a particular topic.
Topic Modelling is a technique to extract hidden topics from large volumes of text. The technique I will be introducing is categorized as an unsupervised machine learning algorithm. The algorithm's name is Latent Dirichlet Allocation (LDA) and is part of Python's Gensim package. LDA was first developed by Blei et al.
This should get you started (although not sure why this hasn't been posted yet): https://github.com/arongdari/python-topic-model
More specifically: 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 """
Looks nice and straightforward. I still suggest at least looking at gensim
. Radim has done a fantastic job of optimizing that software very well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With