I am trying to make an automatic method to do a peak fitting to some spectra, using multiple least squares. I would like to be able to compare the quality of the fit between several different cases. Because the magnitude of the peaks in the samples can vary very much, just comparing the sum of the square of the residuals does not work.

Due to the distribution of the datapoints in the spectrum, the coefficient of determination does not seem a very good choice (many low values and some high values). Taking the logarithm of the values is not possible either, as values may often be zero.

Therefore I was wondering if the sum of the absolute residuals could work as a good estimator for the quality of fit, and dividing it by the sum of the total sample spectrum would work as a "normalized" estimator so I can compare the goodness-of-fit between different cases with different total magnitudes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.