Use Collection instead of Array in TrainingAlgorithms