Giter Club home page Giter Club logo

Comments (5)

dayanandv avatar dayanandv commented on June 18, 2024 1

Hi @amjass12,

If you can compromise on not having the exact format of Gephi dynamic graphs (with Timeline), you may stream the graph to Gephi.
Some time back, I had modified and used pygephi which uses Gephi's Graph Streaming plugin. The plugin runs a server on Gephi (default port number 8082) that receives and processes graph updates sent as JSON. I had written a connector class around it to interface my application (which uses DyNetx) with Gephi. Attaching the connector class file, the modified py3gephi, a toy example, and a gif of how it appears on Gephi.
Gephi_Connector_Files.zip

I can't guarantee the correctness or efficiency of the approach, consider it as a workaround. Hope this helps.

from dynetx.

GiulioRossetti avatar GiulioRossetti commented on June 18, 2024

Hi,
unfortunately, at the moment it is not present a way to read/write dynamic graphml files (the ones that, if I remember correctly, are handled by Gephi). I'll add it to the feature request list.

You are right, the total number of nodes in a dynamic graph is not the mere sum of nodes in each snapshot: nodes and edges may join/leave the network as time goes by, so it is likely that part (or most of them, depending by the observed phenomenon) of them appear multiple times in the network history.

Regarding community discovery on dynamic networks: there are several approaches to address such a problem (here a comprehensive survey).
There are a few implementations of DCD approaches out there (e.g., Tiles or even in the tnetwork library)): however, we are not planning to add them to dynetx since we are also involved in a broader project (CDlib) whose aim is to make available community discovery algorithms implementations in a structured way. We have already planned the extension of such a library to support dynamic community discovery in a forthcoming release.

Best,
Giulio

from dynetx.

amjass12 avatar amjass12 commented on June 18, 2024

Hi @GiulioRossetti ,

thank you so much for your detailed response and for adding this as a feature request, this package is incredibly powerful in telling me how the graph is changing over time! it would be great to be able to visualise this dynamic.

Thank you for confirming re: node numbers.
Thank you also for the community detection information, i will wait for CDlib implementation, is there a rough ETA for this release? I have found in the meantime that carrying out a best partition detection on the individual graphs at individual time points is sufficient.

thanks!

from dynetx.

GiulioRossetti avatar GiulioRossetti commented on June 18, 2024

Hi,
In CDlib we already have a more or less stable backbone for dynamic community representation: the release with DCD methods mostly depends on how complex will be integrating existing methods.

Unfortunately, very few of them are coded in python and all of them model dynamic graphs in an adhoc manner. Hopefully, within the end of the year we'll have a few methods to justify a merge of DCD in the master branch.

from dynetx.

amjass12 avatar amjass12 commented on June 18, 2024

Great! thank you!.. sorry i have one more question! its actually something i have noticed from my temporal dynamic which i am not sure if it is a bug? (sorry just to clarify)

I notice that components that are not present in graphs in some time points are not actually shown as being lost. So for example, i have an node 'x' that is present with a group of another 80 nodes or so at time point 1. This node is no longer present as a connection with any other nodes at time point 2. (I have verified that in time point 2, this node is indeed absent as it does not form any connections under the criteria i have set out (pearson correlation etc)..

When running

for e in g.stream_interactions():
        print e

and saving, I see for example that node x is present at time point 1 as a '+', but that at timepoint 2 it is absent, but does not show that it has disappeared from the nodes it was present with at timepoint 1, in other words no '-'.

Additionally, I have noticed that nodes that show a '-' are all the same:


ENSMUSG00000026691 | ENSMUSG00000026691 | - | 3
ENSMUSG00000062510 | ENSMUSG00000062510 | - | 3
ENSMUSG00000058740 | ENSMUSG00000058740 | - | 3

have I misunderstood something? I imagine that nodes that are lost for example, would be lost at time 'x' but would be lost from different nodes they were connected with at a previous time point?

so it might read for example as ENSMUSG--1| ENSMUSG...2 '-' (if lost at a transition).

please see complete code: maybe I have made a mistake?

networklistTemporal = [networkGraph14, networkGraph12, networkGraph15, networkGraph17,
networkGraph13, networkGraph16, networkGraph18]

dynamic_graph = dn.DynGraph()
for t, graph in enumerate(networklistTemporal):
    dynamic_graph.add_interactions_from(graph.edges(data=True), t=t)

interactions = []
for e in dynamic_graph.stream_interactions():
    #print(e)
    interactions.append(e)
df = pd.DataFrame(interactions)
df.to_csv('interactions.csv')

thank you for your time and sorry for the additional question

edit: I have noticed the number of timepoints in the output of dynamic_graph.stream_interactions() is 8 (0-7) as opposed to 7 (0-6):

When I run dynamic_graph.temporal_snapshots_ids()

It does show the correct number of time points:

dynamic_graph.temporal_snapshots_ids()
[0, 1, 2, 3, 4, 5, 6]

from dynetx.

Related Issues (14)

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.