(self, label_index, unlabel_index, models)
return Infor
Returns:
        Info : 2d array-like 
        shape [n_unlabel_samples, n_classes]
        Informativeness of each unlabel samples
def cal_Informativeness(self, label_index, unlabel_index, models):
        """

        Returns:
        Info : 2d array-like 
        shape [n_unlabel_samples, n_classes]
        Informativeness of each unlabel samples
        """
        Infor = np.zeros((self.n_samples, self.n_classes))
        Uncertainty = self.cal_uncertainty(label_index, unlabel_index, models)
        label_mat = label_index.get_matrix_mask((self.n_samples, self.n_classes), sparse=False)
        unlabel_mat = unlabel_index.get_matrix_mask((self.n_samples, self.n_classes), sparse=False)
        for j in np.arange(self.n_classes):
            j_unlabel = np.where(unlabel_mat[:, j] == 1)[0]
            j_label = np.where(unlabel_mat[:, j] != 1)[0]
            for i in j_unlabel:
                flag = self.cal_relevance(i, j, label_index, models, k=5)
                if flag == 1:
                    Infor[i][j] = Uncertainty[i][j] * 2
                elif flag == -1:
                    Infor[i][j] = Uncertainty[i][j] + self.cal_Udes(i, j, Uncertainty)
            Infor[j_label][j] = -np.infty
        return Infor
def cal_Informativeness ( self , label_index , unlabel_index , models ) : Infor = np . zeros ( ( self . n_samples , self . n_classes ) ) Uncertainty = self . cal_uncertainty ( label_index , unlabel_index , models ) label_mat = label_index . get_matrix_mask ( ( self . n_samples , self . n_classes ) , sparse = False ) unlabel_mat = unlabel_index . get_matrix_mask ( ( self . n_samples , self . n_classes ) , sparse = False ) for j in np . arange ( self . n_classes ) : j_unlabel = np . where ( unlabel_mat [ : , j ] == 1 ) [ 0 ] j_label = np . where ( unlabel_mat [ : , j ] != 1 ) [ 0 ] for i in j_unlabel : flag = self . cal_relevance ( i , j , label_index , models , k = 5 ) if flag == 1 : Infor [ i ] [ j ] = Uncertainty [ i ] [ j ] * 2 elif flag == - 1 : Infor [ i ] [ j ] = Uncertainty [ i ] [ j ] + self . cal_Udes ( i , j , Uncertainty ) Infor [ j_label ] [ j ] = - np . infty return Infor