def splitWithProportion(self, proportion = 0.5):
        indicies = random.permutation(len(self))
        separator = int(len(self) * proportion)

        leftIndicies = indicies[:separator]
        rightIndicies = indicies[separator:]

        leftDs = SupervisedDataSet(inp=self['input'][leftIndicies].copy(),
                                   target=self['target'][leftIndicies].copy())
        rightDs = SupervisedDataSet(inp=self['input'][rightIndicies].copy(),
                                    target=self['target'][rightIndicies].copy())
        return leftDs, rightDs
Sync custom modules into the extension_modules directory
dataset/ETHPy150Open pybrain/pybrain/pybrain/datasets/supervised.py/SupervisedDataSet.splitWithProportion--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/extmods.py/sync