visualizer.py 文件源码

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

项目:dlcv_for_beginners 作者: frombeijingwithlove 项目源码 文件源码
def draw_density_estimation(self, axis, title, samples, cmap):
        axis.clear()
        axis.set_xlabel(title)
        density_estimation = numpy.zeros((self.l_kde, self.l_kde))
        for x, y in samples:
            if 0 < x < 1 and 0 < y < 1:
                density_estimation[int((1-y) / self.resolution)][int(x / self.resolution)] += 1
        density_estimation = filters.gaussian(density_estimation, self.bw_kde_)
        axis.imshow(density_estimation, cmap=cmap)
        axis.xaxis.set_major_locator(pyplot.NullLocator())
        axis.yaxis.set_major_locator(pyplot.NullLocator())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号