def labels_nominal(self) -> np.ndarray:
"""
Returns the nominal labels of all instances in this data set as a NumPy array.
The order of labels in the returned array matches the order in which instances are stored in this data set.
Returns
-------
numpy.ndarray
The nominal labels of the instances in this data set
Raises
------
AttributeError
If the data set is not fully labeled
"""
if not self.is_fully_labeled:
raise AttributeError("data set does not have label information")
return self._data[_DataVar.LABEL_NOMINAL].values.astype(np.str)
评论列表
文章目录