Skip to content

Return no classification labels when top-k is zero - #1553

Merged
SkBlaz merged 1 commit into
masterfrom
fix/joss-20261009-zero-label-predictions
Oct 9, 2026
Merged

SkBlaz merged 1 commit into
masterfrom
fix/joss-20261009-zero-label-predictions

Conversation

@SkBlaz

@SkBlaz SkBlaz commented Oct 9, 2026

Copy link
Copy Markdown
Owner

TopKRanker predicts every label when a sample requests zero labels because [-0:] selects the entire array. Return an empty label list for those samples to avoid false positives and incorrect classification scores.

Validation: fitted-classifier regression fails on master; 32 wrapper tests pass after the fix with 5 existing skips; focused Ruff and diff checks pass.

@SkBlaz
SkBlaz merged commit 10c9f39 into master Oct 9, 2026
39 checks passed
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.

1 participant