Comparison of Algorithmic and Machine Learning Approaches for the Automatic Fitting of Gaussian Peaks