Skip to content

fix: guard optimize_refine_core against float32 noise oscillation#593

Open
yzhuang-els wants to merge 1 commit into
sknetwork-team:developfrom
yzhuang-els:fix/leiden-refine-tolerance
Open

fix: guard optimize_refine_core against float32 noise oscillation#593
yzhuang-els wants to merge 1 commit into
sknetwork-team:developfrom
yzhuang-els:fix/leiden-refine-tolerance

Conversation

@yzhuang-els
Copy link
Copy Markdown

@yzhuang-els yzhuang-els commented May 13, 2026

Fix #592

Modifications:

  • add tol_optimization parameter to optimize_refine_core and require delta_local > tol_optimization for a move, instead of delta_local > 0
  • thread Leiden.tol_optimization (default 1e-3, already exposed on the Python class) through to optimize_refine_core

Impacted submodules:

  • sknetwork.clustering

This pull request:

  • targets the develop branch
  • does not decrease code coverage
  • passes the tests
  • is documented and the documentation build passes
  • has PEP8-compliant code and explicit variable naming

@yzhuang-els yzhuang-els marked this pull request as ready for review May 13, 2026 08:04
@tbonald tbonald self-assigned this May 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.22%. Comparing base (d16f81a) to head (241593b).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #593   +/-   ##
========================================
  Coverage    98.22%   98.22%           
========================================
  Files          182      182           
  Lines         8356     8356           
========================================
  Hits          8208     8208           
  Misses         148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants