Git Product home page Git Product logo

bokeh_plots's Introduction

bokeh plot of a fully connected layer

toy example of plotting a fully connected layer as presented in the blog post Learning when to skim and when to read

Requirements

  • Python 3
  • sklearn
  • numpy
  • pandas
  • bokeh

instructions

the script innards.py expects a pandas dataframe similar to the one found in metrics.pkl. which could have been created from something like:

def save_info(x_dev, y_dev, y_net, prob_net, layer, path_):
    '''
    save test set info into a pandas dataframe and pickle it
    x_dev: sentences (list of strings)
    y_dev: sentiment label (list of ints) ex. 0 negative, 1 positive
    y_net: network output (list of ints) ex. 0 negative, 1 positive
    prob_net: networks probabilities/y
    layer: fully connected layer list of a vector list per sentence
    path_: path to save dataframe
    '''
    d = {'x_dev': x_dev, 'y_dev': y_dev, 'layer': layer,
         'y_net': y_net, 'prob_net': prob_net}
    df = pd.DataFrame(data=d)
    df.to_pickle(path_)

you can also check the jupyter notebook where a version of an LSTM fully connected layer from SST is plotted. So far the two plots of the paragraph Exploring the innards are only implemented

Usising the script innards_finegrained.py one can plot in space more than two classes. An example dataset exists at metrics_f.pkl and the program's output at plot_finegrained.html.

bokeh_plots's People

Contributors

bill-kalog avatar

Watchers

James Cloos avatar

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.