snap-stanford / graphwave

170 stars 53 forks source link

Several bugs with 'Using GraphWave' iPython notebook #9

Open motiwari opened 6 years ago

motiwari commented 6 years ago

Thanks for putting together the tutorial in the iPython notebook! While trying to use it, I came across the following bugs and suggested fixes:

  1. from graphwave.shapes import build_graph should be from GraphWave.shapes import build_graph

  2. from graphwave.graphwave import * should be from GraphWave.graphwave import *

  3. in build_graph.py, from utils.utils import * should be from ...utils.utils import * - this is not best practice, but is a temporary bandaid for a breaking build path

  4. np.random.seed(123) should be in the 2nd cell (not in the 1st) so that the 2nd cell can be rerun multiple times with the same result

  5. chi, heat_print, taus=graphwave(G, taus='automatic', verbose=False) should be chi, heat_print, taus=graphwave_alg(G, time_pnts, taus='auto', verbose=False) - this is really a couple of things: function graphwave has been renamed to graphwave_alg (I think?), time_pnts argument should be provided (looks like the function signature has changed), and automatic should be auto

Can the author verify that these changes are in fact correct and update the 'Using GraphWave' notebook with the results that are expected?

JhuoW commented 5 years ago

when running basis, role_id = eval(basis_type)(start, width_basis) this error occurs: name 'cycle' is not defined. Do you know how to fix it?