GithubHelp home page GithubHelp logo

cs224w-final's People

Contributors

sashaperigo avatar vagupta16 avatar varunabgupta avatar

Watchers

 avatar  avatar  avatar

cs224w-final's Issues

Use sampler functions in networks.py to produce random walks on graphs

Here's what I mean:

-for every primitive type:
for every primitive node of that type:
while primitive != TERMINAL_MARKER:
select the successor type
sample one successor node of that type according to some distribution (uniform if Erdos Renyi, distance-based if Watts-Strogatz)
record that successor node (or action)
primitive = successor
-return our actions

The samplers that we have currently take in percentages - we just need to either identify a percentage that returns a single node or change the percentage parameter to something else

the percentage you can use to get exactly one node back is:

float(1)/len(successor_indices_list)

Cache watts-strogatz distributions

Every time we build a Watts-Strogatz based graph (or do a Watts Strogatz random graph), we recompute the probability distribution from every primitive source to its successor list.

We should just cache these distributions - it'll save a ton of computation time for the random walks in particular.

I'm literally imagining a solution like:

--global--
CACHE = {}

def watts_strogatz_sampler():
if primitive_source not in CACHE:
recompute distribution & store it in CACHE
else: get distribution from CACHE
... use distribution

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.