Skip to content

Generalization to unseen categories #42

Description

@rvinas

In the context transfer tutorial (predicting perturbation responses for unseen cell-types), the train set contains the OOD cell-type (B cell):

OOD split

(adata[adata.obs['split_B'] == 'ood'].obs['cell_type'].values == 'B').sum()
# Prints 774

Train split

(adata[adata.obs['split_B'] == 'train'].obs['cell_type'].values == 'B').sum()
# Prints 543

I am interested in the scenario where certain conditions are not available at train time. When I do inference on unseen conditions using a trained CPA model, I get the following error:

ValueError: Category CATEGORY_NAME not found in source registry. Cannot transfer setup without `extend_categories = True`.

How can I set up CPA to generalize to unseen categories?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions