Trainer.partitionData() and tests

- Added defaultsWith for general default setting + tests