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

multiple edges won't be merged #1251

Closed
ChrisHH opened this issue Dec 24, 2015 · 37 comments
Closed

multiple edges won't be merged #1251

ChrisHH opened this issue Dec 24, 2015 · 37 comments

Comments

@ChrisHH
Copy link

ChrisHH commented Dec 24, 2015

I am using gephi 0.9.0 (latest version) on my Macbook Pro.
It worked fine so far.

After doing the latest updates I observed the problem, that multiple edges won't be merged (and up-weighted) any longer. It looks like, that multiple edges will be ignored after their first occurrence and the weight is set to 1.

Best
Chris

@eduramiba
Copy link
Member

What kind of import are you doing? Spreadsheet import? It now in fact does not sum weights when duplicated edges are found. Instead it not overwrites the edge attributes with the new values.

This has been changed because, in the near future, spreadsheet import will support multi-graphs.
If the old weight summing was useful for you, I can add an option to enable it back.

@ChrisHH
Copy link
Author

ChrisHH commented Dec 24, 2015

I am doing the CSV import via data laboratory.
For now the old weight summing is very useful to me, as the multiple edges are thicker in the graph.
Yes, maybe an option can be provided within the import dialogue!?

@eduramiba
Copy link
Member

Sure, I will add an option to sum weights like before when duplicated edges are found.

@eduramiba eduramiba self-assigned this Dec 24, 2015
@eduramiba eduramiba added this to the 0.9.1 milestone Dec 24, 2015
@ChrisHH
Copy link
Author

ChrisHH commented Dec 24, 2015

Great, thank you!

@eduramiba
Copy link
Member

Also need to update the wizard text, now it is incorrect. It still says that attributes will be ignored and weights summed.

@ChrisHH
Copy link
Author

ChrisHH commented Dec 25, 2015

Yes, that was actually confusing me and lead me to re-install gephi.

@GitHubFDC
Copy link

It's my understanding that one of the benefits of Gephi 0.9 is that it handles multi-edges, which is a great benefit to have for certain types of modeling. It sounds like the fix will be to add an option to either a) allow multi-edges, or b) provide an option to allow the import function to merge duplicate edges and sum their weights. This sounds like a great solution, provided Gephi doesn't lose the ability to handle more than one edge that connects two nodes. -Thanks!

@eduramiba
Copy link
Member

There is an issue to support multi-edges in spreadsheet import (#1248). But that will need, like gexf import, a 'Kind' column with different values for different edges.

Repeated edges with the same kind will still be merged, and their weights should be summed. So that's why we actually have a bug here and I need to get the weight summing feature back.

@duncdrum
Copy link

duncdrum commented Jan 5, 2016

@eduramiba You can see where I am with @kind here

eduramiba added a commit that referenced this issue Jan 10, 2016
Fix issue #1272 - NullPointerException on SQLite import [0.9.0]
Fix issue #1239 - SVG, PDF export generate 'null pointer' exception
Fix issue #1281 Data laboratory - NullPointerException when switching workspaces
Fix #1251 multiple edges won't be merged - Go back to old weight summing logic and not overriding other attributes. (These changes + more control should be added with #1282 (Migrate spreadsheet importer to Import API))
@GitHubFDC
Copy link

One other quick question with multi-edges in Gephi 0.9--more specifically, dynamic multi-edges.

Suppose one imports a list of dynamic edges--including such entries as:
Id Source Target Weight Type Duration Kind
E1 N1 N2 1.0 directed <1.0, 2.0> "works_for"
E2 N1 N2 2.0 directed <3.5, 5.0> "works_for"

Would E1 and E2 be merged as a SINGLE edge that is "on" during (t=1.0 and t=2.0 with weight 1.0) and again during (t=3.5 and t=5.0 with weight 2.0), or would these be seen as two separated edges, despite the "kind" being identical between them? Or, can the import function handle the merging of dynamic multi-edges?

Thanks!

@duncdrum
Copy link

@GitHubFDC @kind works more like @type in this respect. An edge can appear at multiple times between identical nodes independent of its kind. So yes these would be two separate edges, since they have separate @id. They just happen to be of the same kind. You could read this as one edge by doing something like this.

[...]
<edge id="1" source="N1" target="N2" weight="1.0, 2.0, 3.5, 5.0" type="directed" kind="works_for"/>

and use listDouble as the datatype for the weight attribute. You can follow the work in progress on this here:
https://github.com/gephi/gexf .

If you want to suggest a merge on kind feature for Gephi's data import you can open a new issue.

@eduramiba
Copy link
Member

Actually there can be no two edges with the same kind, source and target even if they have a different id. Core graph API does not allow this.

About spreadsheet import, we will only sum edge weights when duplicated (same source, target and kind), I don't think we will merge time intervals, in order to keep things simple and unambiguous. You should write the whole interval interval in one place if you want that (<[1.0, 2.0]; [3.5, 5.0]>).

The related issue for this is #1248

@duncdrum
Copy link

Thanks @eduramiba for clarifying, i ll have to make sure that the schema checks for this.

@eduramiba
Copy link
Member

I don't think the gexf schema needs to check for this. That will be done by the gexf importer, right? @mbastian knows this better

@duncdrum
Copy link

Yes, but if people construct gexf files outside of Gephi there should be a validation errror, explaining that @id is not enough to determine an edge in this case.

@3ruce
Copy link

3ruce commented Feb 29, 2016

@eduramiba Hi Eduardo, do you mean my gdf file or @otichy's CSV?

@eduramiba
Copy link
Member

Oh this seems a different problem now. Since with 0.9.1 real parallel edges (same source, target and kind) are allowed, something must have changed in the graphstore API so the spreadsheet importer is not detecting that an edge already exists and does not sum weights, but actually creates another edge with same source and target (which should be the default behaviour in the future, but still have an option to sum weights).

I could reproduce it with this file: test.zip

Will have to investigate this, thanks for the report.

@eduramiba eduramiba reopened this Feb 29, 2016
@otichy
Copy link

otichy commented Feb 29, 2016

Just in case more examples are needed, here is my CSV. Thanks!

pceec-concordance.zip

@zebraengine
Copy link

I noticed that in the 0.9.2 development nightly - isn't merging or providing a check box to merge duplicate edges that have the same ID pairs. Am i suppose to enable this prior to utilizing the data laboratory import process?

@jpoko
Copy link

jpoko commented Apr 12, 2016

I installed the newest Gephi version 0.9.1 and tried to merge/append the graphs that I was working with previously (comment above on Feb 4) and it is having the same problem - the edge weight does not increase and it returns the error below. I have it selected to append the graph and the edge merge strategy set to 'sum'.

java.lang.IllegalArgumentException: The edge id already exist
at org.gephi.graph.impl.EdgeStore.checkIdDoesntExist(EdgeStore.java:1011)
at org.gephi.graph.impl.EdgeStore.add(EdgeStore.java:541)
at org.gephi.graph.impl.GraphStore.addEdge(GraphStore.java:163)
at org.gephi.io.processor.plugin.DefaultProcessor.process(DefaultProcessor.java:210)
at org.gephi.io.processor.plugin.AppendProcessor.process(AppendProcessor.java:88)
at org.gephi.io.importer.impl.ImportControllerImpl.process(ImportControllerImpl.java:292)
at org.gephi.desktop.importer.DesktopImportControllerUI.finishImport(DesktopImportControllerUI.java:638)
at org.gephi.desktop.importer.DesktopImportControllerUI.access$200(DesktopImportControllerUI.java:102)
at org.gephi.desktop.importer.DesktopImportControllerUI$6.run(DesktopImportControllerUI.java:286)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:274)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

@judithmp
Copy link

Did I get it right that this issue is touching different subitems?
a) spreadsheet import
b) gexf import
c) multiple networks
...

For a) I can confirm @jpoko (on 12/4):
I tried to import a csv with duplicated edges - neither in 0.9.1 nor in 0.9.2 the edges were merged and their weight summed. (Mac OS 10.11.3)

I'd like to use edge merging for data manipulation with large files (e.g. dense bipartite networks generated from secondary data where you want to cut off edge weights below some point). So I'm using 0.8 in parallel.

@eduramiba
Copy link
Member

eduramiba commented Apr 14, 2016

This issue is only about spreadsheet import. Problems in gexf import should be included in a separate issue.

@HalldisNaamah
Copy link

I am sorry if my question seems ridiculous to you guys, but I still do not know how to get edges summed together. Has this problem been solved?

I was using the older version 0.8.2 and there it was done automatically. Now I am running 0.9.1 on Mac OS 10.10.5 and nothing happens...

I am importing CSV that contains data in this format:
Target, Source, Type
A, B, Undriected
B, C, Undirected
B, A, Unidriected
C, A, Undirected
A, B, Undirected

And after import all the edges have weight = 1.0

I have read that you need to install some updates and it should be fine but when I go to Tools -> Plugins - Check for updates it does not show any updates. And I am connected to Gephi updates Center and Gephi third Parties Plugins.

I would appreciate your help.

@eduramiba
Copy link
Member

Not solved yet, sorry. But it's a high priority bug.

El 7 oct. 2016 2:48 p. m., "HalldisNaamah" [email protected]
escribió:

I am sorry if my question seems ridiculous to you guys, but I still do not
know how to get edges summed together. Has this problem been solved?

I was using the older version 0.8.2 and there it was done automatically.
Now I am running 0.9.1 on Mac OS 10.10.5 and nothing happens...

I am importing CSV that contains data in this format:
Target, Source, Type
A, B, Undriected
B, C, Undirected
B, A, Unidriected
C, A, Undirected
A, B, Undirected

And after import all the edges have weight = 1.0

I have read that you need to install some updates and it should be fine
but when I go to Tools -> Plugins - Check for updates it does not show any
updates. And I am connected to Gephi updates Center and Gephi third Parties
Plugins.

I would appreciate your help.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#1251 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAMCpaqkGnFjZsrCQfqeNJ40UIjd19xsks5qxj-ogaJpZM4G7Hzd
.

@jeremyreffin
Copy link

Bump. This is a high priority bug for this user too!

Thanks for all the great work.

@WouterSpekkink
Copy link

Yep, sorry to build up the pressure, but I would like to see this implemented too.

@eduramiba eduramiba added High and removed Medium labels Nov 21, 2016
eduramiba added a commit that referenced this issue Dec 30, 2016
Based on commit 6b041a4

#1526 NullPointerException on Modularity Statistics with gexf with kind / parallel nodes
#1633 Gephi 0.9.1 freezes for dynamical graphs
#1636 Ranking operation not working (node color and size)
#1640 taken screenshot will be overwritten
#1454 Suddenly not importing all of my edges
#1489 CSV import error: found rows with empty source or target columns
#1251 Multiple edges won't be merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests