News for hackers. Stuff that matters.
Re:Show HN: Python library for embedding large graphs (Writt... by h4kor on Tuesday November 29, 2022 @04:51AM (#33785568)
Thanks for the feedback. The library only calculates the positions and has no graphical output.

As an example: I created this to build this embedding of Mastodon instances. https://h4kor.github.io/fediverse-explorer/

Re:Show HN: Python library for embedding large graphs (Writt... by ljvmiranda on Tuesday November 29, 2022 @05:12AM (#33785704)
I'm looking at the Fediverse explorer and I'm curious how to interpret the embeddings (or the distances between points). What does it mean when two instances are near each other (e.g., sigmoid.social and mastodon-belgium.be)? Is it related to the number of follows?
Re:Show HN: Python library for embedding large graphs (Writt... by h4kor on Tuesday November 29, 2022 @06:56AM (#33786432)
Currently I only use the peering information of instances. Instances are places close to each other when they are peering.

As a next step I want to refine this as peering itself does not say anything about how much users of these instances interact. For this I will have to sample the users of instances and who they follow.

Re:Show HN: Python library for embedding large graphs (Writt... by anentropic on Tuesday November 29, 2022 @01:25PM (#33791217)
I did also want to see a picture, presumably the point of the lib is to make a nice layout of nodes even though that then has to be rendered with another tool?
Re:Show HN: Python library for embedding large graphs (Writt... by h4kor on Wednesday November 30, 2022 @02:09AM (#33797832)
Yes, I built it as a replacement for the networkx spring_layout function.
Re:Show HN: Python library for embedding large graphs (Writt... by bArray on Tuesday November 29, 2022 @02:36PM (#33792151)
Could you not give input and output examples for the graphs? I.e. show networkx before and after your positioning?

Also how well will this scale for large numbers of nodes, say thousands? Currently using networkx I have to perform tens of thousands of iterations on the spring_layout to get quite mediocre results.

Re:Show HN: Python library for embedding large graphs (Writt... by h4kor on Tuesday November 29, 2022 @04:02PM (#33793252)
I've two models implement, one of which is the networkx model, which I would recommend at the moment.

I implemented this because networkx was to memory consuming and too slow.

Where networkx crashed with 24k nodes I was able to embed them with this library, it will still take several hours, but at least it's doable. The number of iterations should be on same magnitude as the number of nodes. For my graph #Iteration = 1/2 #nodes was sufficient.