LDA placing weights on topics

4 ビュー (過去 30 日間)
Rob
Rob 2023 年 6 月 29 日
コメント済み: Rob 2023 年 7 月 19 日
Hi everyone,
Is there a known method or previous work on how to assign weights to topics obtained from the LDA algorithm and combine them into a single weighted topic vector? I have come across the Term Frequency-Inverse Document Frequency (tf-idf) matrix, which is integrated into MATLAB but requires the use of the bagofwords() expression. I have also searched for information on UMass and CV, but it doesn't seem to be available in any of the toolboxes (please correct me if I'm wrong).
Therefore, I would be more than grateful for any recommendations or tips. Many thanks!
Rob

回答 (1 件)

Pranjal Saxena
Pranjal Saxena 2023 年 7 月 19 日
Hi Rob,
I understand that you want to assign weight to topics obtained from LDA algorithm and combine them into a single weighted topic vector.
MATLAB provides the bagOfWords function and the tfidf function in the Text Analytics Toolbox, which allows you to calculate tf-idf weights for a collection of documents. You can use these functions to create a tf-idf matrix and apply it to the topics obtained from LDA.
I would like to suggest you refer to the following MATLAB documentations for more information about it.
I hope this helps you.
  1 件のコメント
Rob
Rob 2023 年 7 月 19 日
Thanks for your answer! That's what I originally thought I would do, compute the weights via tf-idf and then apply them to the LDA outcome, until I came across this post. It's basically saying we can't combine both approaches, unless I am reading this wrong. Apologies, this might be a more data/stats question but it would be great if I could get a second opinion on this, because using the approach you described makes total sense. Thanks!
Rob

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNearest Neighbors についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by