def compute_folds(self):
        neg, pos = self.randomize()
        nn = len(neg) / self.num_folds
        np = len(pos) / self.num_folds
        folds = []
        for i in range(self.num_folds):
            s = i * nn
            e = (i + 1) * nn
            train_neg, test_neg = neg[:s] + neg[e:], neg[s:e]
            s = i * np
            e = (i + 1) * np
            train_pos, test_pos = pos[:s] + pos[e:], pos[s:e]
            fold = (train_neg + train_pos, test_neg + test_pos)
            folds.append(fold)
        self.folds = folds
dataset/ETHPy150Open kvh/ramp/ramp/folds.py/BalancedFolds.compute_folds/original