Git Product home page Git Product logo

Comments (1)

JoshRosen avatar JoshRosen commented on September 26, 2024

The latest stats_db dump should have the data for this: https://www.dropbox.com/s/t5zg9dqb0eoe6lv/stats_db.zip

This should have the required data to begin exploring different clustering techniques. Here was my first attempt at using PCA to show the model at timestep 40 (colors according to true image class), which should be a decent example of how to use the data:

>>> from deepviz_webui.model_stats_db import ModelStatsDB
>>> db = ModelStatsDB("stats_db")
>>> probs = db.get_stats(40).probs_by_image
>>> probs
array([[  1.29584700e-03,   3.57754361e-05,   5.01396321e-02, ...,
          7.13144150e-03,   4.18440730e-04,   3.63701925e-04],
       [  1.50107443e-02,   9.17336904e-03,   3.14076282e-02, ...,
          4.42980155e-02,   6.94869012e-02,   1.35898665e-01],
       [  1.14151709e-01,   3.09785362e-03,   8.43245164e-03, ...,
          9.15541202e-02,   7.15444088e-02,   2.27550700e-01],
       ...,
       [  3.99635881e-01,   6.38790429e-03,   6.37241304e-02, ...,
          6.20891619e-03,   3.05531979e-01,   5.47074946e-04],
       [  9.86086950e-02,   9.97514580e-04,   5.42566031e-02, ...,
          6.17355225e-04,   2.41912946e-01,   9.71772615e-03],
       [  1.26740802e-02,   5.66647970e-04,   6.76987618e-02, ...,
          2.52383947e-02,   1.17670270e-02,   6.42727688e-03]], dtype=float32)
>>> from deepviz_webui.imagecorpus import CIFAR10ImageCorpus
>>> corpus = CIFAR10ImageCorpus("../cifar-10-py-colmajor")
>>> from sklearn.decomposition import PCA
>>> pca = PCA(2)
>>> r = pca.fit_transform(probs)
>>> r
array([[-0.22592825, -0.03838477],
       [ 0.1176122 , -0.12934557],
       [ 0.15507133,  0.13634114],
       ...,
       [ 0.39083847,  0.14840141],
       [ 0.07537034,  0.03404486],
       [-0.135039  , -0.00479577]], dtype=float32)
>>> import pylab as pl
>>> pl.scatter(r[:, 0], r[:, 1], c=corpus._image_labels)
<matplotlib.collections.PathCollection object at 0x110cea790>
>>> pl.show()

figure_1

from deepviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.