(self, n, col, opt)
return self._data[idx]
Sample data from original training data satisfying the sampled conditional vector.

        Returns:
            n rows of matrix data.
Sample data from original training data satisfying the sampled conditional vector.
Sample data from original training data satisfying the sampled conditional vector .
def sample_data(self, n, col, opt):
        """Sample data from original training data satisfying the sampled conditional vector.

        Returns:
            n rows of matrix data.
        """
        if col is None:
            idx = np.random.randint(len(self._data), size=n)
            return self._data[idx]

        idx = []
        for c, o in zip(col, opt):
            idx.append(np.random.choice(self._rid_by_cat_cols[c][o]))

        return self._data[idx]
def sample_data ( self , n , col , opt ) : if col is None : idx = np . random . randint ( len ( self . _data ) , size = n ) return self . _data [ idx ] idx = [ ] for c , o in zip ( col , opt ) : idx . append ( np . random . choice ( self . _rid_by_cat_cols [ c ] [ o ] ) ) return self . _data [ idx ]