Describe the bug:
Current librep.datasets.multimodal.TransformMultiModalDataset implementation apply a sequence of transformations to a dataset, resulting in a new dataset. However the resultant dataset is not of the same type as input dataset.
To Reproduce:
The code to verify the behavior:
from librep.datasets.multimodal import TransformMultiModalDataset
from librep.transforms.fft import FFT
kuhar_dataset_path = Path("../data/views/KuHar/balanced_motionsense_equivalent_view")
kh_train, kh_validation, kh_test = PandasDatasetsIO(kuhar_dataset_path).load()
features = [
"accel-x",
"accel-y",
"accel-z",
"gyro-x",
"gyro-y",
"gyro-z"
]
# Creating the datasets
# Train
kh_train_dataset = PandasMultiModalDataset(
kh_train,
feature_prefixes=features,
label_columns="activity code",
as_array=True
)
fft_transform = FFT()
transformer = TransformMultiModalDataset(transforms=[fft_transform], new_window_name_prefix="fft.")
resampled_kh_train_dataset_fft = transformer(kh_train_dataset)
print(type(kh_train_dataset), type(resampled_kh_train_dataset_fft))
Expected behavior:
The returned type from transformed object should be the same as the input object type.
Desktop:
Some solutions:
Adapt to use multimodal-array package may be a solution.
Describe the bug:
Current
librep.datasets.multimodal.TransformMultiModalDatasetimplementation apply a sequence of transformations to a dataset, resulting in a new dataset. However the resultant dataset is not of the same type as input dataset.To Reproduce:
The code to verify the behavior:
Expected behavior:
The returned type from transformed object should be the same as the input object type.
Desktop:
Some solutions:
Adapt to use multimodal-array package may be a solution.