dataeval.data.merge_datasets

dataeval.data.merge_datasets(*datasets)

Concatenate datasets that share a label vocabulary into one dataset view.

Returns a lazy, read-only AnnotatedDataset that indexes through the given datasets in order. All datasets must already share the same index2label so their integer labels denote the same classes — use dataeval.data.Conform with dataeval.data.Relabel to conform datasets to a common reference vocabulary first.

Parameters:
*datasets : AnnotatedDataset

Two or more datasets to merge. Each must expose an index2label in its metadata, and all must be equal.

Returns:

A concatenated view whose metadata carries the shared index2label.

Return type:

AnnotatedDataset

Raises:

ValueError – If no datasets are given, or their index2label mappings differ.

See also

dataeval.data.Conform

Conform a dataset to a reference vocabulary.