edflow.data.processing.labels module¶
Summary¶
Classes:
A dataset with extra labels added. |
|
A label only dataset to avoid loading unnecessary data. |
Reference¶
-
class
edflow.data.processing.labels.LabelDataset(data)[source]¶ Bases:
edflow.data.dataset_mixin.DatasetMixinA label only dataset to avoid loading unnecessary data.
-
__init__(data)[source]¶ - Parameters
data (DatasetMixin) – Some dataset where we are only interested in the labels.
-
-
class
edflow.data.processing.labels.ExtraLabelsDataset(data, labeler)[source]¶ Bases:
edflow.data.dataset_mixin.DatasetMixinA dataset with extra labels added.
-
__init__(data, labeler)[source]¶ - Parameters
data (DatasetMixin) – Some Base dataset you want to add labels to
labeler (Callable) – Must accept two arguments: a
Datasetand an indexiand return a dictionary of labels to add or overwrite. For all indices the keys in the returneddictmust be the same and the type and shape of the values at those keys must be the same per key.
-
property
labels¶ Add default behaviour for datasets defining an attribute
data, which in turn is a dataset. This happens often when stacking several datasets on top of each other.The default behaviour is to return
self.data.labelsif possible, and otherwise revert to the original behaviour.
-