[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •negative edge weight for repulsive force
Page 1 of 1

negative edge weight for repulsive force

Posted: 09 Mar 2017 11:43
by robertbiloute
Hello,

I'm trying to set up a method for defining a layout of plants. The idea is to accumulate data on "plant companioning", i.e. plants that does get along very well vs. plants that does not like each other, then given a set of plants automatically define a plant layout that is optimized in term of plant association.
To do that, I want to affect an attractive force to edges between two companion plants, and a repulsive force to edges between two "anti companion" plant. Then appyling a force directed algorithm should allow to define an optimal layout for the chosen set of plants.
Now if I understood well, all the force directed algorithm I saw so far are affecting an attractive force to weighted edges (or I should say to the 2 corresponding nodes), and a repulsive force to non-paired nodes.

So first I'm not sure about the behaviour of force directed algorithms with negative weights, is it really generating a repulsive force ? I tried on little toy examples and it seems to work, could anyone confirm that ?

And second, a clustering algorithm with attraction for weighted edges, and repulsion for non paired nodes, is already doing pretty well it seems. But I would need to be sure that the repulsion that I want between two nodes with a negative weight edge is indeed stronger than the "classical" repulsion between non-paired nodes. Indeed in my model, 2 unpaired nodes are just 2 plants that does not really care about the proximity of each other, while 2 nodes paired by a negative weight should not be placed next to each other, so I have to be sure that "negative weight" repulsion is stronger than "non paired" repulsion.

Finally, I maybe missed some other type of algorithms that would be more suited to my case, so far I only look at gephi plugins.

Thanks!

Re: negative edge weight for repulsive force

Posted: 09 Mar 2017 11:52
by eduramiba
Hi,
I don't think negative weights are supported at all.

Re: negative edge weight for repulsive force

Posted: 09 Mar 2017 12:06
by robertbiloute
That's indeed a possibility and the few doc I saw about that were rather ignoring the question/describing it very loosely, and I nevertheless seem to see some repulsion for negatively weighted edges on toy examples..