(self, label_index, unlabel_index, batch_size=1, **kwargs)
return [tpl[i] for i in perm]
Select indexes randomly.

        Parameters
        ----------
        label_index: object
            Add this parameter to ensure the consistency of api of strategies.
            Please ignore it.

        unlabel_index: collections.Iterable
            The indexes of unlabeled set.

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

        Returns
        -------
        selected_idx: list
            The selected indexes which is a subset of unlabel_index.
Select indexes randomly.
Select indexes randomly .
def select(self, label_index, unlabel_index, batch_size=1, **kwargs):
        """Select indexes randomly.

        Parameters
        ----------
        label_index: object
            Add this parameter to ensure the consistency of api of strategies.
            Please ignore it.

        unlabel_index: collections.Iterable
            The indexes of unlabeled set.

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

        Returns
        -------
        selected_idx: list
            The selected indexes which is a subset of unlabel_index.
        """
        if len(unlabel_index) <= batch_size:
            return np.array([i for i in unlabel_index])
        perm = randperm(len(unlabel_index) - 1, batch_size)
        tpl = list(unlabel_index.index)
        return [tpl[i] for i in perm]
def select ( self , label_index , unlabel_index , batch_size = 1 , * * kwargs ) : if len ( unlabel_index ) <= batch_size : return np . array ( [ i for i in unlabel_index ] ) perm = randperm ( len ( unlabel_index ) - 1 , batch_size ) tpl = list ( unlabel_index . index ) return [ tpl [ i ] for i in perm ]