def from_percents(self):
        # Assumes positive is constrained (rarer) class
        rp = self.train_percent * self.n_positives
        tp = (1 - self.train_percent) * self.n_positives
        rn = self.train_pos_percent / rp - rp
        tn = tp / self.test_pos_percent - tp
        train_neg = pd.Index(np.random.choice(self.negatives,
                                              int(rn),
                                              replace=True))
        test_neg = pd.Index(np.random.choice(self.negatives - train_neg,
                                             int(tn),
                                             replace=True))
        train_pos = pd.Index(np.random.choice(self.positives,
                                              int(rp),
                                              replace=True))
        test_pos = pd.Index(np.random.choice(self.positives - train_pos,
                                             int(tp),
                                             replace=True))
        return train_neg, test_neg, train_pos, test_pos
dataset/ETHPy150Open kvh/ramp/ramp/folds.py/BootstrapFolds.from_percents/swapped operands of `/`