clsdatainfo clsdatainfo ¶ Module for ClsDataInfo Classes¶ ClsData dataclass ¶ Contains all data for classification Functions¶ get_identifier ¶ get_identifier() Return the identifier Source code in niceml/data/datainfos/clsdatainfo.py 61 62 63def get_identifier(self) -> str: """Return the identifier""" return self.identifier get_index_list ¶ get_index_list() Return a list of class indexes Source code in niceml/data/datainfos/clsdatainfo.py 65 66 67def get_index_list(self) -> List[int]: """Return a list of class indexes""" return [self.class_idx] if isinstance(self.class_idx, int) else self.class_idx get_index_of_name ¶ get_index_of_name(name) Return the index of the class with the given name Source code in niceml/data/datainfos/clsdatainfo.py 75 76 77def get_index_of_name(self, name: str) -> int: """Return the index of the class with the given name""" return self.get_name_list().index(name) get_name_list ¶ get_name_list() Return a list of class names Source code in niceml/data/datainfos/clsdatainfo.py 69 70 71 72 73def get_name_list(self) -> List[str]: """Return a list of class names""" return ( [self.class_name] if isinstance(self.class_name, str) else self.class_name ) ClsDataInfo dataclass ¶ Bases: ImageDataInfo Contains all information about one data point for classification Functions¶ get_image_filepath ¶ get_image_filepath() Return the image filepath Source code in niceml/data/datainfos/clsdatainfo.py 33 34 35def get_image_filepath(self) -> str: """Return the image filepath""" return get_location_uri(self.image_location) get_image_location ¶ get_image_location() Return the image filepath Source code in niceml/data/datainfos/clsdatainfo.py 29 30 31def get_image_location(self) -> Union[dict, LocationConfig]: """Return the image filepath""" return self.image_location get_index_list ¶ get_index_list() Return a list of class indexes Source code in niceml/data/datainfos/clsdatainfo.py 37 38 39def get_index_list(self) -> List[int]: """Return a list of class indexes""" return [self.class_idx] if isinstance(self.class_idx, int) else self.class_idx get_index_of_name ¶ get_index_of_name(name) Return the index of the class with the given name Source code in niceml/data/datainfos/clsdatainfo.py 47 48 49def get_index_of_name(self, name: str) -> int: """Return the index of the class with the given name""" return self.get_name_list().index(name) get_name_list ¶ get_name_list() Return a list of class names Source code in niceml/data/datainfos/clsdatainfo.py 41 42 43 44 45def get_name_list(self) -> List[str]: """Return a list of class names""" return ( [self.class_name] if isinstance(self.class_name, str) else self.class_name ) Functions¶