I'm trying to fit a function to data using FindFit, but I can't find a way to replace norm function RMSE with a RMSE in log space: Total[(Log10[a] - Log10[b])^2]
I tried:
logNorm [x_, y_] = Total[(Log10[x + 1] - Log10[y + 1])^2];
nlm = FindFit[data, x*a+b, {a, b}, x, NormFunction -> (logNorm[#] &)]
But I get an error:
The function value
logNorm[<long list>]is not a real number at{a,b} = {1.,1.}.

NormFunctionoperates on the list of residuals, which are already formed and provided to this function. You seem to want it to represent the log-distance to the point. Sorry, but it cannot do this; you should useFindMinimuminstead with a suitable objective function.FindFitjust callsFindMinimuminternally, if that makes you feel better. – Oleksandr R. Dec 20 '15 at 22:46Norm[Log10[## + 1], 2] &what you want? I am not sure I understand what yourxandyarguments tologNormare supposed to represent. – Oleksandr R. Dec 20 '15 at 22:54f[Delta=observed-calculated], so you should transform your logarithmic expression to this form instead of yourf[observed,calculated]. – Rom38 Dec 21 '15 at 10:50