data_generator.py 文件源码

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

项目:DCN 作者: alexnowakvila 项目源码 文件源码
def plot_example(self, x, y, clusters, length):
        plt.figure(0)
        plt.clf()
        colors = cm.rainbow(np.linspace(0, 1, clusters))
        for c in range(clusters):
            ind = np.where(y == c)[0]
            plt.scatter(x[ind, 0], x[ind, 1], c=colors[c])
        path = '/home/anowak/DynamicProgramming/DP/plots/example.png'
        plt.savefig(path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号