Structural Topic Modeling in R: group the topics deductively and estimate effect

核能气质少年 提交于 2021-02-08 09:16:22

问题


The stm package in R allows the user to estimate the relationship between metadata and topics. I have a model M with 40 topics, and I want to explore how they change with time. In stm, it should be something like this (adapted from Molly Roberts et al., stm: R Package for Structural Topic Models):

prep = estimateEffect(1:40 ~ s(day), M, meta = out$meta, uncertainty = "Global")

This command will return 40 pairs of relationships, each refers to one topic. However, upon reading the topics I found it makes theoretical sense to group some of the topics together and reduce the number of topics. Is there a way of grouping the topics manually?

来源:https://stackoverflow.com/questions/48657585/structural-topic-modeling-in-r-group-the-topics-deductively-and-estimate-effect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!