Skip to content

Commit

Permalink
add returns
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Dec 16, 2024
1 parent 8c80ab3 commit 5c7061e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rapids_singlecell/preprocessing/_harmony/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _compute_objective(
O: cp.ndarray,
E: cp.ndarray,
objective_arr: list,
):
) -> None:
kmeans_error = cp.sum(_R_multi_m(R, cp.dot(Z_norm, Y_norm.T)))
R = R / R.sum(axis=1, keepdims=True)
entropy = cp.sum(R * cp.log(R + 1e-12))
Expand All @@ -431,7 +431,7 @@ def _is_convergent_harmony(objectives_harmony: list, tol: float) -> bool:

def _is_convergent_clustering(
objectives_clustering: list, tol: list, window_size: int = 3
):
) -> bool:
if len(objectives_clustering) < window_size + 1:
return False
obj_old = 0.0
Expand Down

0 comments on commit 5c7061e

Please sign in to comment.