Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/control_methods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Loading