partitioning training data