How does gradient descent help machine learning models reduce prediction errors during training? What role do learning rate, loss functions, and weight updates play in the optimization process? What challenges can developers face when selecting a suitable learning rate?