Skip to content

Commit

Permalink
Hotfix of multimodal plot visualisation (#927)
Browse files Browse the repository at this point in the history
added property class_labels to MultiModalData class, so now plot_predictions works on multimodal data too
  • Loading branch information
andreygetmanov authored Oct 13, 2022
1 parent eb89843 commit 30d3b7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fedot/core/data/multi_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30d3b7b

Please sign in to comment.