From cb8c6b62ee0e09ed1122fc586acce6b5f6d9cd78 Mon Sep 17 00:00:00 2001 From: Ines Oliveira e Silva Date: Thu, 22 Feb 2024 14:29:42 +0000 Subject: [PATCH] Fixed index setting in generic dataset (#177) --- src/aequitas/flow/datasets/generic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/aequitas/flow/datasets/generic.py b/src/aequitas/flow/datasets/generic.py index b5abf489..e8c578f8 100644 --- a/src/aequitas/flow/datasets/generic.py +++ b/src/aequitas/flow/datasets/generic.py @@ -164,8 +164,12 @@ def load_data(self) -> None: self._validate_splits() else: train = read_method(self.paths[0]) + train_index = train.index[-1] validation = read_method(self.paths[1]) + validation.set_index(validation.index + train_index + 1, inplace=True) + validation_index = validation.index[-1] test = read_method(self.paths[2]) + test.set_index(test.index + validation_index + 1, inplace=True) self._indexes = [train.index, validation.index, test.index] self.data = pd.concat([train, validation, test])