Skip to content

[FEA] Improve kmeans::fit_predict by keeping predicted labels from fit#1939

Open
lowener wants to merge 3 commits intorapidsai:mainfrom
lowener:26.06-kmeans-fit
Open

[FEA] Improve kmeans::fit_predict by keeping predicted labels from fit#1939
lowener wants to merge 3 commits intorapidsai:mainfrom
lowener:26.06-kmeans-fit

Conversation

@lowener
Copy link
Contributor

@lowener lowener commented Mar 20, 2026

In this PR I remove the additionnal predict() call present in kmeans::fit_predict(), to instead keep the labels already computed in fit().

I moved the public API function fit_predict and fit in the same compilation unit since they both use the same detail::fit but with different parameters now.
Some unnecessary template instantiation are removed as well.

kmeans_balanced::fit_predict() now also expose inertia just like the regular fit() and now supports half datatype at no extra size cost for the library.

Signed-off-by: Mickael Ide <mide@nvidia.com>
@lowener lowener added the non-breaking Introduces a non-breaking change label Mar 20, 2026
@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 20, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@aamijar aamijar added the improvement Improves an existing functionality label Mar 20, 2026
@aamijar aamijar moved this to In Progress in Unstructured Data Processing Mar 20, 2026
@lowener lowener added the C++ label Mar 20, 2026
@lowener lowener marked this pull request as ready for review March 24, 2026 15:33
@lowener lowener requested review from a team as code owners March 24, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants