From 30d3b7bf1a05fa850e2bff8b7c26982389beea7a Mon Sep 17 00:00:00 2001 From: Andrey Getmanov <91334765+andreygetmanov@users.noreply.github.com> Date: Thu, 13 Oct 2022 19:04:17 +0200 Subject: [PATCH] Hotfix of multimodal plot visualisation (#927) added property class_labels to MultiModalData class, so now plot_predictions works on multimodal data too --- fedot/core/data/multi_modal.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fedot/core/data/multi_modal.py b/fedot/core/data/multi_modal.py index 490b5ba3d8..ab8c7c0880 100644 --- a/fedot/core/data/multi_modal.py +++ b/fedot/core/data/multi_modal.py @@ -63,6 +63,13 @@ def num_classes(self) -> Optional[int]: else: return None + @property + def class_labels(self) -> Optional[List[Union[int, str, float]]]: + if self.task.task_type == TaskTypesEnum.classification and self.target is not None: + return np.unique(self.target) + else: + return None + def shuffle(self): # TODO implement multi-modal shuffle pass