Skip to content

Implement MDL metric value#1358

Open
popchanovska wants to merge 1 commit into
SkBlaz:masterfrom
popchanovska:feature/autocommunity_executor
Open

Implement MDL metric value#1358
popchanovska wants to merge 1 commit into
SkBlaz:masterfrom
popchanovska:feature/autocommunity_executor

Conversation

@popchanovska
Copy link
Copy Markdown
Contributor

@popchanovska popchanovska commented May 14, 2026

Description

Implements elif metric_name == "mdl": in autocommunity_executor.py.

Motivation

No placeholder and always 0.0 value.

Changes

            elif metric_name == "mdl":
                # Extract from algorithm metadata (SBM algorithms compute this)
                # For non-SBM algorithms, this metric is not available

                meta = result.get('meta', {})
                mdl_value = meta.get('mdl')
                if mdl_value is None:
                    mdl_value = meta.get('bic')
                value = mdl_value if mdl_value is not None else 0.0

Testing

  • 'make test' executed, 120 issues found
  • 'make lint' executed

Breaking Changes

None.

TODO

  • Need to check how to implement MDL (if possible) in Louvain/Leiden/Infomap result dicts.
  • For Louvain/Leiden/Infomap result.get('meta') returns None because the key is never set, make this consistent.
  • Instead of 0.0 when there is no value, return None. Need to see how this would be then used by Pareto.
  • Recheck if meta.get('bic') returns anything, because in runner.py there is no bic value for meta key.

@popchanovska popchanovska requested a review from SkBlaz as a code owner May 14, 2026 13:00
@SkBlaz
Copy link
Copy Markdown
Owner

SkBlaz commented May 17, 2026

@popchanovska wip?

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