Commit b052dd4
authored
fix(analytical): Fix Louvain algorithm's stop condition (#4387)
<!--
Thanks for your contribution! please review
https://github.com/alibaba/GraphScope/blob/main/CONTRIBUTING.md before
opening an issue.
-->
## What do these changes do?
<!-- Please give a short brief about these changes. -->
When using Louvain algorithm, I found a question with its stop
condition, the Louvain algotithm's quality may be 0, 0.85, 0.80, I want
to stop the iterations at 0.80 as the quality has started to decrease,
but the current stop condition can't do that.
Besides, the change is consistent with [NetworkX's
implementation](https://github.com/networkx/networkx/blob/c34400f1ea5b9daa733b971f7f5ef7072fe410a9/networkx/algorithms/community/louvain.py#L216)
## Related issue number
<!-- Are there any issues opened that will be resolved by merging this
change? -->
Fixes1 parent f8250fb commit b052dd4
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
| 229 | + | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
0 commit comments