From a051cf97c047a9bafb63963e8f0059b0ba763665 Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 19 Dec 2024 10:53:38 +0100 Subject: [PATCH] updated docstring --- src/rapids_singlecell/preprocessing/_harmony/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rapids_singlecell/preprocessing/_harmony/__init__.py b/src/rapids_singlecell/preprocessing/_harmony/__init__.py index 78ac9db3..2dd8cac5 100644 --- a/src/rapids_singlecell/preprocessing/_harmony/__init__.py +++ b/src/rapids_singlecell/preprocessing/_harmony/__init__.py @@ -241,7 +241,6 @@ def _initialize_centroids( *, theta: cp.ndarray, random_state: int = 0, - n_init: int = 10, ) -> tuple[cp.ndarray, cp.ndarray, cp.ndarray, list]: kmeans = CumlKMeans( n_clusters=n_clusters, init="k-means||", max_iter=25, random_state=random_state @@ -288,7 +287,12 @@ def _clustering( block_proportion: float, ) -> None: """ - Modifies R, O and E in place. + Perform iterative clustering updates on normalized input data, adjusting + cluster assignments and associated penalty terms until convergence or + maximum iterations are reached. + + This function operates in-place to update the cluster assignment matrix (R) + and penalty-related matrices (O and E). """ n_cells = Z_norm.shape[0] objectives_clustering = []