scvi.data.fields.LabelsWithUnlabeledObsField#
- class scvi.data.fields.LabelsWithUnlabeledObsField(registry_key, obs_key, unlabeled_category)[source]#
An AnnDataField for labels which include explicitly unlabeled cells.
Remaps the unlabeled category to the final index if present in labels. The unlabeled category is a specific category name specified by the user.
Attributes table#
The key of the data field within the relevant AnnData attribute. |
|
The name of the AnnData attribute where the data is stored. |
|
Returns True if the field is empty as a function of its kwargs. |
|
The modality key of the data field within the MuData (if applicable). |
|
The key that is referenced by models via a data loader. |
Methods table#
Returns a nested dictionary which describes the mapping to the data field. |
|
|
Returns the requested data as determined by the field. |
|
Get summary stats. |
|
Register the field. |
|
Transfer the field. |
|
Validate field. |
|
View state registry. |
Attributes#
- LabelsWithUnlabeledObsField.CATEGORICAL_MAPPING_KEY = 'categorical_mapping'#
- LabelsWithUnlabeledObsField.ORIGINAL_ATTR_KEY = 'original_key'#
- LabelsWithUnlabeledObsField.UNLABELED_CATEGORY = 'unlabeled_category'#
Methods#
- LabelsWithUnlabeledObsField.get_data_registry()[source]#
Returns a nested dictionary which describes the mapping to the data field.
The dictionary is of the form {“mod_key”: mod_key, “attr_name”: attr_name, “attr_key”: attr_key}. This mapping is then combined with the mappings of other fields to make up the data registry.
- Return type:
- LabelsWithUnlabeledObsField.get_field_data(adata)[source]#
Returns the requested data as determined by the field.
- LabelsWithUnlabeledObsField.get_summary_stats(state_registry)[source]#
Get summary stats.
- Return type: