SpreadingActivation.py 文件源码

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

项目:Quadflor 作者: quadflor 项目源码 文件源码
def fit(self, X, y=None):
        # the bell methods require additional information
        if self.method in ["bell", "belllog"]:
            # precompute node count by level
            self.levels = defaultdict(int)
            for node in self.hierarchy.nodes():
                l = nx.shortest_path_length(self.hierarchy, self.root, node)
                self.levels[l] += 1


            print(self.levels)
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号