openml/datasets/dataset.py
def retrieve_class_labels(self, target_name: str = "class") -> Union[None, List[str]]:
        """Reads the datasets arff to determine the class-labels.

        If the task has no class labels (for example a regression problem)
        it returns None. Necessary because the data returned by get_data
        only contains the indices of the classes, while OpenML needs the real
        classname when uploading the results of a run.

        Parameters
        ----------
        target_name : str
            Name of the target attribute

        Returns
        -------
        list
        """
        if self.features is None:
            raise ValueError(
                "retrieve_class_labels can only be called if feature information is available."
            )
        for feature in self.features.values():
            if (feature.name == target_name) and (feature.data_type == "nominal"):
                return feature.nominal_values
        return None
Reads the datasets arff to determine the class-labels.

        If the task has no class labels (for example a regression problem)
        it returns None. Necessary because the data returned by get_data
        only contains the indices of the classes, while OpenML needs the real
        classname when uploading the results of a run.

        Parameters
        ----------
        target_name : str
            Name of the target attribute

        Returns
        -------
        list
        
Reads the datasets arff to determine the class-labels.
If the task has no class labels (for example a regression problem)
it returns None. Necessary because the data returned by get_data
only contains the indices of the classes, while OpenML needs the real
classname when uploading the results of a run.

Parameters

target_name : str
Name of the target attribute

Returns

list
Reads the datasets arff to determine the class - labels . If the task has no class labels ( for example a regression problem ) it returns None . Necessary because the data returned by get_data only contains the indices of the classes while OpenML needs the real classname when uploading the results of a run . Parameters target_name : str Name of the target attribute Returns list
def retrieve_class_labels(self, target_name: str = "class") -> Union[None, List[str]]:
        if self.features is None:
            raise ValueError(
                "retrieve_class_labels can only be called if feature information is available."
            )
        for feature in self.features.values():
            if (feature.name == target_name) and (feature.data_type == "nominal"):
                return feature.nominal_values
        return None
def retrieve_class_labels ( self , target_name : str = "class" ) -> Union [ None , List [ str ] ] : if self . features is None : raise ValueError ( "retrieve_class_labels can only be called if feature information is available." ) for feature in self . features . values ( ) : if ( feature . name == target_name ) and ( feature . data_type == "nominal" ) : return feature . nominal_values return None
Reads the datasets arff to determine the class-labels.
Reads the datasets arff to determine the class - labels .
"""Reads the datasets arff to determine the class-labels.

        If the task has no class labels (for example a regression problem)
        it returns None. Necessary because the data returned by get_data
        only contains the indices of the classes, while OpenML needs the real
        classname when uploading the results of a run.

        Parameters
        ----------
        target_name : str
            Name of the target attribute

        Returns
        -------
        list
        """
self
target_name
str