diff --git a/CHANGELOG.md b/CHANGELOG.md index 1acea7f44..de2361efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,12 +75,13 @@ * Give `methods/fadvi` a `gpu` label. Without one it was scheduled on the CPU partition with no GPU attached, so it trained on the CPU and hit its walltime on every dataset. * Give `methods/scalex` a `midcpu` label instead of `lowcpu`. It is CPU-bound only because its engine has no CUDA. - * Split Scanorama into two methods/scores - - Split Scanorama into embedding (integrate) and count-correction (correct) modes, instead of running both together. - This makes clear what the reported score(s) are describing, and also corrects the misleadingly low score that - the combined method receives. The scores for each component are in line with their scores from v1, where the modes - were separated. + - Split Scanorama into embedding (integrate) and count-correction (correct) modes, instead of running both together. + This makes clear what the reported score(s) are describing, and also corrects the misleadingly low score that + the combined method receives. The scores for each component are in line with their scores from v1, where the modes + were separated. +* Remove jitter from the `embed_cell_types` control method, distinguishing its behavior from + `embed_cell_types_jittered` (PR #102). # task_batch_integration 2.0.0 diff --git a/src/control_methods/utils.py b/src/control_methods/utils.py index 954e24af2..d83c30fbb 100644 --- a/src/control_methods/utils.py +++ b/src/control_methods/utils.py @@ -40,7 +40,7 @@ def _randomize_graph(adata, partition=None, neighbors_key="neighbors"): return adata -def _perfect_embedding(partition, jitter=0.01): +def _perfect_embedding(partition, jitter=None): """ Taken and adapted from opsca-v1: https://github.com/openproblems-bio/openproblems/blob/acf5c95a7306b819c4a13972783433d0a48f769b/openproblems/tasks/_batch_integration/_common/methods/baseline.py#L37 @@ -51,6 +51,7 @@ def _perfect_embedding(partition, jitter=0.01): embedding = OneHotEncoder().fit_transform( LabelEncoder().fit_transform(partition)[:, None] ) + embedding = embedding.toarray() if jitter is not None: embedding = embedding + np.random.uniform(-1 * jitter, jitter, embedding.shape) return np.asarray(embedding)