Tulip-Dev / tulip

Large graphs analysis, drawing and visualization framework
http://tulip.labri.fr/
GNU Lesser General Public License v3.0
125 stars 24 forks source link

No Tulip integer algorithm plugin named Louvain? #53

Closed guywiz closed 5 years ago

guywiz commented 6 years ago

(posted on sourceforge, I was suggested to bring it up here instead)

I am using Tulip 5.2, OS X, running python on the command line (as well as in a script):

dataSet = tlp.getDefaultPluginParameters('Louvain', graph) graph.applyAlgorithm('Louvain', dataSet)

I get an error:

Exception: No Tulip integer algorithm plugin named Louvain.

raised by the call to applyAlgorithm -- while the getDefaultPluginParameters indeed returns a dictionary with the right parameter entries ... This is confusing.

dataSet {'metric': None, 'modularity': 0.0, 'result': , '#communities': 0L, 'precision': 1e-06}

I also tried calling applyIntegerAlgorithm (cleaner according to brenoust), but I get the same error:

graph.applyIntegerAlgorithm('Louvain', graph.getIntegerProperty('Louvain'), dataSet) Traceback (most recent call last): File "", line 1, in Exception: No Tulip integer algorithm plugin named Louvain.

Any help appreciated. Cheers, Guy

tulipdev commented 6 years ago

You're right! I have the same issue with the Integer Algorithm, although Louvain is in auto-sompletion. It should be called from Double Algorithm. See below for reference:

dS = tlp.getDefaultPluginParameters('Louvain')

graph.applyDoubleAlgorithm('Louvain', graph['viewMetric'], dS)

(True, '')

graph.applyIntegerAlgorithm('Louvain', graph.getIntegerProperty('viewIntegerMetric'), dS)

Traceback (most recent call last):

File "", line 1, in

Exception: No Tulip integer algorithm plugin named Louvain.

Cheers,

Benjamin

On Wed, 3 Oct 2018 at 14:48, guywiz notifications@github.com wrote:

(posted on sourceforge, I was suggested to bring it up here instead)

I am using Tulip 5.2, OS X, running python on the command line (as well as in a script):

dataSet = tlp.getDefaultPluginParameters('Louvain', graph) graph.applyAlgorithm('Louvain', dataSet)

I get an error:

Exception: No Tulip integer algorithm plugin named Louvain.

raised by the call to applyAlgorithm -- while the getDefaultPluginParameters indeed returns a dictionary with the right parameter entries ... This is confusing.

I also tried calling applyIntegerAlgorithm (cleaner according to brenoust), but I get the same error:

graph.applyIntegerAlgorithm('Louvain', graph.getIntegerProperty('Louvain'), dataSet) Traceback (most recent call last): File "", line 1, in Exception: No Tulip integer algorithm plugin named Louvain.

Any help appreciated. Cheers, Guy

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Tulip-Dev/tulip/issues/53, or mute the thread https://github.com/notifications/unsubscribe-auth/ARP9lswcpocRQwP57SgkF8naq-gvdwFHks5uhE-kgaJpZM4XFVw0 .

guywiz commented 6 years ago

Let's call it the Semantic Gap problem. To me a clustering, since it applies to a finite graph and thus indexes nodes by integer (classes), it seemes natural to store its result in an integer property ...

tulipdev commented 6 years ago

At this point the difference between Double and Integer is more on performance and optimization. From a user's perspective, Integer properties main use is also for enumerated properties (such as viewShape and so on). I think those subtleties are better kept to developers, while transparent to users.

In most cases, they could be (agnostic-ally) numerical, so it won't be too much a problem to have the call duplicated in Double or Integer (depending if you wish to consider value ordering or not, s.a. when you still sometimes want to use them with an interpolate-able color mapping). In your case you refer to labels, usually strings, which would not give the same flexibility probably.

Benjamin

On Wed, 3 Oct 2018 at 16:15, guywiz notifications@github.com wrote:

Let's call it the Semantic Gap problem. To me a clustering, since it applies to a finite graph and thus indexes nodes by integer (classes), it seemes natural to store its result in an integer property ...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tulip-Dev/tulip/issues/53#issuecomment-426535289, or mute the thread https://github.com/notifications/unsubscribe-auth/ARP9lgNt3C_-FqDTh-57Lv0azsPlE7RLks5uhGQVgaJpZM4XFVw0 .

guywiz commented 6 years ago

I agree, keep this transparent to users, for dummies like me numbers are numbers, period.

tulipdev commented 6 years ago

Hahaha, apologies again for the semantic confusion ;-) And thank you for your report and contribution!

Benjamin

On Wed, 3 Oct 2018 at 16:28, guywiz notifications@github.com wrote:

I agree, keep this transparent to users, for dummies like me numbers are numbers, period.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tulip-Dev/tulip/issues/53#issuecomment-426538310, or mute the thread https://github.com/notifications/unsubscribe-auth/ARP9ljmq9L0MPZWaSVHrrf6dDfkY5yckks5uhGcigaJpZM4XFVw0 .