Beispiel #1
0
 def makeplot_(fnum, prefix, data, labels='centroids', centroids=centroids):
     return clustertool.plot_centroids(data,
                                       centroids,
                                       labels=labels,
                                       fnum=fnum,
                                       prefix=prefix + '\n',
                                       **kwd)
Beispiel #2
0
    def view_vocab(fpath):
        # QUANTIZED AND FLOATING POINT STATS
        centroids = ut.load_cPkl(fpath)
        print('viewing vocat fpath=%r' % (fpath,))
        smk_debug.vector_stats(centroids, 'centroids')
        #centroids_float = centroids.astype(np.float64) / 255.0
        centroids_float = centroids.astype(np.float64) / 512.0
        smk_debug.vector_stats(centroids_float, 'centroids_float')

        fig = clustertool.plot_centroids(centroids, centroids, labels='centroids',
                                         fnum=1, prefix='centroid vecs\n', **kwd)
        fig.show()
Beispiel #3
0
    def view_vocab(fpath):
        # QUANTIZED AND FLOATING POINT STATS
        centroids = ut.load_cPkl(fpath)
        print('viewing vocat fpath=%r' % (fpath, ))
        smk_debug.vector_stats(centroids, 'centroids')
        #centroids_float = centroids.astype(np.float64) / 255.0
        centroids_float = centroids.astype(np.float64) / 512.0
        smk_debug.vector_stats(centroids_float, 'centroids_float')

        fig = clustertool.plot_centroids(centroids,
                                         centroids,
                                         labels='centroids',
                                         fnum=1,
                                         prefix='centroid vecs\n',
                                         **kwd)
        fig.show()
Beispiel #4
0
 def makeplot_(fnum, prefix, data, labels='centroids', centroids=centroids):
     return clustertool.plot_centroids(data, centroids, labels=labels,
                                       fnum=fnum, prefix=prefix + '\n', **kwd)