def collect_independent(self, counts):

        sampled = RunData(self.solver_names, common_budget = self.common_budget)

        for solver in self.solver_names:
            iter_count = itertools.cycle(counts)

            for id_ in sorted(self.ids, key = lambda _: numpy.random.rand()):
                count = next(iter_count)
                runs = sorted(self.runs_on(id_, solver), key = lambda _: numpy.random.rand())

                sampled.add_runs((id_, run) for run in runs[:count])

                if id_ not in sampled.feature_vectors:
                    sampled.add_feature_vector(id_, self.feature_vectors[id_])

        return sampled
Get independent subsets of the data.
dataset/ETHPy150Open borg-project/borg/borg/storage.py/RunData.collect_independent