Skip to content

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

Draft
lowener wants to merge 1 commit intorapidsai:mainfrom
lowener:26.06-kmeans-fit
Draft

[FEA] Improve kmeans::fit_predict by keeping predicted labels from fit#1939
lowener wants to merge 1 commit 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.
Still WIP because I need to do the same improvement in kmeans_balanced

Signed-off-by: Mickael Ide <mide@nvidia.com>
@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
@lowener lowener added the C++ label Mar 20, 2026
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

Development

Successfully merging this pull request may close these issues.

2 participants