data_set.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:auDeep 作者: auDeep 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号