Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Heat' object has no attribute 'analysis' #7

Open
sgrady3 opened this issue Jun 14, 2018 · 6 comments
Open

AttributeError: 'Heat' object has no attribute 'analysis' #7

sgrady3 opened this issue Jun 14, 2018 · 6 comments

Comments

@sgrady3
Copy link

sgrady3 commented Jun 14, 2018

I've been trying to use the graphwave function and there seems to be a bug. When I run the function graphwave on a networkx graph I get the error mentioned in the title:
AttributeError: 'Heat' object has no attribute 'analysis'
I've tracked this to the file heat_diffusion.py line 53:
Sf_vec = Hk.analysis(np.eye(n_nodes))

I looked that the pygsp filter class documentation for a function called analysis but only found analyze. When trying to replace analysis with analyze in heat_diffusion.py line 53 I get an index range error so I don't think this is the fix.

I hope this helps, I'm very interested in using this technique and would like to be able to use this code.

-Thank you

@donnate
Copy link
Contributor

donnate commented Jun 14, 2018

Hi,

Thank you for picking up this mistake. This is due to an update in the pygsp Library.
I have fixed this and made the code independent from pygsp (all you now need is numpy, scipy, pandas and networkx).
Please let me know if you encounter further issues!

@sgrady3
Copy link
Author

sgrady3 commented Jun 14, 2018

Thank you! I do have one question. The current implementation of graphwave_alg as an argument for a list of time points. Do you have an intuition for what would be a good selection of time points?

@donnate
Copy link
Contributor

donnate commented Jun 14, 2018

Hi,

For the list of time points, I typically used 25 evenly spaced points in 0:100 (np.linspace(0,100,25)). In order to "guide" the choice of the range and number of samples, I found it useful to plot a few parametric curve induced by the characteristic functions, and visually assess if they are all clamped together, etc. This gives you a way to assess visually the amount of signal in the embeddings.
Hope this helps!
Do let me know if you have any additional issues!

@sgrady3
Copy link
Author

sgrady3 commented Jun 14, 2018

Great, thank you the advice. I do have one other question. I saw in the paper that the embeddings are independent of graph size. Are the embeddings always of size 700?

@donnate
Copy link
Contributor

donnate commented Jun 15, 2018

Hi,
No, the embedding size varies: each node structural embedding is of size equal to:
2 x nb_timepoints x nb_scales
where:

  • the 2 comes from the fact that we have a real and imaginary part,
  • nb_timepoints is the number of time points that you use to sample along the parametric curve induced by each characteristic function
  • and nb_scales is the number of different scales that you stack up in your multi-resolution signature.

@sgrady3
Copy link
Author

sgrady3 commented Jun 15, 2018

Okay, that clears up a lot. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants