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())
visualizer.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录