Cleaned up function: ParameterLearning.