I've got a very simple problem, but not so trivial. I need to split a dataset (input and output data) in three part randomly: training set 70%, validation set 20% and is test set 10%. First of all this splitting have to be random, but reproducible, so I set SeedRandom. So I produce this simple code to split in two part (70% and 30%), but I've some problem to split in three part (70%, 20% and 10%). SeedRandom[1234]; index = RandomSample[Range[Length[input]], IntegerPart[Length[input]*0.3]]; indexp = Partition[index, 1]; inputv = {}; outputv = {}; (*Validation TEST*) inputv = Table[Append[inputv, input[[i]]], {i, index}]; outputv = Table[Append[outputv, output[[i]]], {i, index}]; (*Test TEST*) inputt = Delete[input, indexp]; outputt = Delete[output, indexp]; inputv = Flatten[inputv, 1]; outputv = Flatten[outputv]; Could you help me? Thanks...