Added functionality to train the model using sum with default parameters