Skip to content

Avoid subsetting cells in NMF initialisation #3

@krademaker

Description

@krademaker

In this NMF initialisation, cells are subsetted.

However, I noticed that if cells are actually subsetted, this will lead to inconsistent tensor dimensions when running the actual NMF model. E.g.: RuntimeError: The size of tensor a (270000) must match the size of tensor b (766783) at non-singleton dimension 0.

For a dataset:

         Summary Statistics          
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃     Summary Stat KeyValue  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│         n_cells766783 │
│          n_vars474   │
│         n_batch27   │
│ n_extra_categorical_covs1    │
│ n_extra_continuous_covs0    │
│    n_var_categoricals1    │
└──────────────────────────┴────────┘

And the NMF loadings initialised for only 270000 cells.

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