Skip to content

Add metric option to CoreSet. - #517

Merged
tpham93 merged 4 commits into
release-1-0-0from
516-core-set-metric
Nov 19, 2025
Merged

tpham93 merged 4 commits into
release-1-0-0from
516-core-set-metric

Conversation

@mherde

@mherde mherde commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Closes #516

Additional context

Add metric and metric_dict parameters to the __init__ of CoreSet. This allows to use many different metrics from sklearn and scipy.

@mherde
mherde changed the base branch from master to development October 27, 2025 11:35
@codecov

codecov Bot commented Oct 27, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (83568b2) to head (dd6cb53).
⚠️ Report is 3 commits behind head on development.

Additional details and impacted files
@@              Coverage Diff              @@
##           development      #517   +/-   ##
=============================================
  Coverage       100.00%   100.00%           
=============================================
  Files               64        64           
  Lines             5658      5662    +4     
=============================================
+ Hits              5658      5662    +4     
Flag Coverage Δ
3.10 100.00% <100.00%> (ø)
3.11 100.00% <100.00%> (ø)
3.12 100.00% <100.00%> (ø)
3.13 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@tpham93
tpham93 changed the base branch from development to release-1-0-0 November 12, 2025 13:37
mapping=None,
n_new_cand=None,
metric="euclidean",
metric_dict=None,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstring from above:

    metric : str or callable, default='euclidean'
        The metric must comply with the function
        `sklearn.metrics.pairwise_distances_argmin_min`.
    metric_dict : dict, default=None
        Any further parameters are passed directly to the function
        `sklearn.metrics.pairwise_distances_argmin_min` as `metric_kwargs`.

@tpham93
tpham93 merged commit d7d414a into release-1-0-0 Nov 19, 2025
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.

FR: Add metric option to CoreSet.

2 participants