cellmap_data.CellMapSubset#
- class cellmap_data.CellMapSubset(dataset: CellMapDataset | CellMapMultiDataset, indices: Sequence[int])[source]#
- Parameters:
dataset (Dataset[_T_co]) – CellMapDataset | CellMapMultiDataset The dataset to be subsetted.
indices (Sequence[int]) – Sequence[int] The indices of the dataset to be used as the subset.
- __init__(dataset: CellMapDataset | CellMapMultiDataset, indices: Sequence[int]) None [source]#
- Parameters:
dataset (CellMapDataset | CellMapMultiDataset) – CellMapDataset | CellMapMultiDataset The dataset to be subsetted.
indices (Sequence[int]) – Sequence[int] The indices of the dataset to be used as the subset.
- Return type:
None
Methods
__init__
(dataset, indices)set_raw_value_transforms
(transforms)Sets the raw value transforms for the subset dataset.
set_target_value_transforms
(transforms)Sets the target value transforms for the subset dataset.
to
(device)Move the dataset to the specified device.
Attributes
The number of samples in each class in the dataset normalized by resolution.
The class weights for the dataset based on the number of samples in each class.
The classes in the dataset.
The indices of the validation set.
dataset
indices
- property classes: Sequence[str]#
The classes in the dataset.
- property class_counts: dict[str, float]#
The number of samples in each class in the dataset normalized by resolution.
- property class_weights: dict[str, float]#
The class weights for the dataset based on the number of samples in each class.
- property validation_indices: Sequence[int]#
The indices of the validation set.
- to(device) CellMapSubset [source]#
Move the dataset to the specified device.
- Return type: