From b0d853b0657837120b0ac906943b02f1addd900b Mon Sep 17 00:00:00 2001 From: Antoni Zajko Date: Tue, 5 Dec 2023 20:33:55 +0100 Subject: [PATCH] Fix type of y in RandomFeaturesPandasDataset --- liltab/data/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liltab/data/datasets.py b/liltab/data/datasets.py index 8cf09c8..697730d 100644 --- a/liltab/data/datasets.py +++ b/liltab/data/datasets.py @@ -215,7 +215,7 @@ def __getitem__(self, idx: list[int]) -> tuple[Tensor, Tensor]: X = torch.from_numpy(self.df[self.attributes].to_numpy()).type(torch.float32) if self.encode_categorical_target: - y = self.y + y = torch.from_numpy(self.y).type(torch.float32) else: y = torch.from_numpy(self.df[self.responses].to_numpy()).type(torch.float32)