hsbm_tm.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:hSBM_Topicmodel 作者: martingerlach 项目源码 文件源码
def __init__(self,args):
        '''
        Initialize hsbm-instance
        - create a folder where to save results: self.args.output
        - make a bipartite word-doc graph from the corpus. save as self.graph
        - do the hsbm inference. save the state as self.inference
        '''
        self.args = args
        self.out_path = self.args.output

        if not os.path.exists(self.out_path):
            os.makedirs(self.out_path)

        ## get the graph-object
        self.graph = self.make_graph()
        ## do the hsbm-inference
        self.state = self.inference(self.graph)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号