Skip to content

[MRG] Fix silhouette metric parameter collisions - #718

Merged
charavelg merged 1 commit into
tslearn-team:mainfrom
WilliamK112:fix/silhouette-metric-params-713
Aug 26, 2026
Merged

charavelg merged 1 commit into
tslearn-team:mainfrom
WilliamK112:fix/silhouette-metric-params-713

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

Summary

  • prevent be, n_jobs, and verbose from colliding with arguments already controlled by silhouette_score and silhouette_samples
  • handle be consistently whether it arrives through metric_params or direct keyword input
  • document which metric parameters are overridden or inferred
  • add regression coverage for both public functions and both input paths

The precomputed-metric behavior discussed in #714 is intentionally unchanged.

Closes #713

Validation

  • pytest tests/test_clustering.py -q — 13 passed
  • pytest --doctest-modules tslearn/clustering/utils.py -q — 3 passed
  • pytest -q --doctest-modules — 1,168 passed, 44 skipped, 11 xfailed
  • git diff --check

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.26%. Comparing base (a4eb51a) to head (0b5fbd1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #718      +/-   ##
==========================================
+ Coverage   95.21%   95.26%   +0.04%     
==========================================
  Files          83       83              
  Lines        7902     7916      +14     
==========================================
+ Hits         7524     7541      +17     
+ Misses        378      375       -3     

☔ View full report in Codecov by Harness.
📢 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.

@charavelg
charavelg merged commit 73ff407 into tslearn-team:main Aug 26, 2026
27 checks passed
@charavelg

Copy link
Copy Markdown
Contributor

Thanks for the fix!!!

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.

silhouette_samples/silhouette_score: metric_params collides with pinned arguments

2 participants