taynaud / python-louvain

Louvain Community Detection
BSD 3-Clause "New" or "Revised" License
965 stars 200 forks source link

Eulerian Graph #85

Closed PeeteM closed 2 years ago

PeeteM commented 3 years ago

Hi,

I have a quick question for the group. If you have a minute, I'd appreciate your help & clarifications.

In the documentation it is stated that the graph to be clustered via Louvain must be Eulerian. (NetworkXError If the graph is not Eulerian.)

BUT then the examples shown are with NON-Eulerian graphs (ER & Karate Club). Neither of these graphs has only nodes with even degree...

Why is a Eulerian graph required? The Louvain algorithm is designed to work on Eulerian & non-Eulerian graphs, no?

taynaud commented 3 years ago

Hello,

Thanks for the report, it is clearly a mistake in the documentation. I will fix that after some tests on the true limitations (it needs at least an undirected graph, maybe fully connected)

taynaud commented 2 years ago

Fixed in master