(self, label_index, unlabel_index, batch_size=1, select_type='ins-lab', **kwargs)
Select a subset from the unlabeled set, return the selected instance and label.

        Parameters
        ----------
        label_index: ignore

        unlabel_index: {list, np.ndarray, MultiLabelIndexCollection}
            The indexes of unlabeled samples. It should be a 1d array of indexes (column major, start from 0) or
            MultiLabelIndexCollection or a list of tuples with 2 elements, in which,
            the 1st element is the index of instance and the 2nd element is the index of labels.

        batch_size: int, optional (default=1)
            Selection batch size.

        select_type: {'ins', 'ins-lab'}
            The selection type.
            ins: select a batch of instances to query all of their labels.
            ins-lab: select a batch of instance-label pairs to query.

        Returns
        -------
        selected_ind: list
            The selected indexes. It is a list of tuples.
Select a subset from the unlabeled set, return the selected instance and label.
Select a subset from the unlabeled set return the selected instance and label .
def select(self, label_index, unlabel_index, batch_size=1, select_type='ins-lab', **kwargs):
        """Select a subset from the unlabeled set, return the selected instance and label.

        Parameters
        ----------
        label_index: ignore

        unlabel_index: {list, np.ndarray, MultiLabelIndexCollection}
            The indexes of unlabeled samples. It should be a 1d array of indexes (column major, start from 0) or
            MultiLabelIndexCollection or a list of tuples with 2 elements, in which,
            the 1st element is the index of instance and the 2nd element is the index of labels.

        batch_size: int, optional (default=1)
            Selection batch size.

        select_type: {'ins', 'ins-lab'}
            The selection type.
            ins: select a batch of instances to query all of their labels.
            ins-lab: select a batch of instance-label pairs to query.

        Returns
        -------
        selected_ind: list
            The selected indexes. It is a list of tuples.
        """
        if select_type == 'ins':
            if len(unlabel_index) <= batch_size:
                return unlabel_index
            unkonwn_entries = self._check_multi_label_ind(unlabel_index)
            unkonwn_ins = unkonwn_entries.get_instance_index()
            perm = randperm(len(unkonwn_ins) - 1, batch_size)
            return [(unkonwn_ins[i],) for i in perm]
        elif select_type == 'ins-lab':
            if len(unlabel_index) <= batch_size:
                return unlabel_index
            unkonwn_entries = self._check_multi_label_ind(unlabel_index)
            perm = randperm(len(unkonwn_entries) - 1, batch_size)
            tpl = list(unkonwn_entries.index)
            return [tpl[i] for i in perm]
        else:
            raise ValueError("select_type must be one of {'ins', 'ins-lab'}")
def select ( self , label_index , unlabel_index , batch_size = 1 , select_type = 'ins-lab' , * * kwargs ) : if select_type == 'ins' : if len ( unlabel_index ) <= batch_size : return unlabel_index unkonwn_entries = self . _check_multi_label_ind ( unlabel_index ) unkonwn_ins = unkonwn_entries . get_instance_index ( ) perm = randperm ( len ( unkonwn_ins ) - 1 , batch_size ) return [ ( unkonwn_ins [ i ] , ) for i in perm ] elif select_type == 'ins-lab' : if len ( unlabel_index ) <= batch_size : return unlabel_index unkonwn_entries = self . _check_multi_label_ind ( unlabel_index ) perm = randperm ( len ( unkonwn_entries ) - 1 , batch_size ) tpl = list ( unkonwn_entries . index ) return [ tpl [ i ] for i in perm ] else : raise ValueError ( "select_type must be one of {'ins', 'ins-lab'}" )