change "n" to "num_training_data"