CHALLENGE: MQO curve adjustment or similar with minimization of other types of error measurements

Asked

Viewed 64 times

0

Context

The MQO (ordinary least squares) method is known to receive:

  • a function model f parameter x (which can represent several parameters) from a model with coefficients c[1], c[2], ..., c[o], preferably linear between them, i.e., following the model f(x) = f[1](x)*c[1] + f[2](x)*c[2] + f[3](x)*c[3] + ... + f[o](x)*c[o]),
  • a series of data relating arguments x[1], x[2], ..., x[n] and results y[1], y[2], ..., y[n]

and provides as a result of applying the method the values of coefficients that provide the function f with minor rapprochement errors in these relationships f(x)~y, errors measured as a whole by the sum of the squares of the residue (exact value differences and approximation), thus minimizing the formula ( y[1]-f(x[1]) )²+( y[2]-f(x[2]) )²+( y[3]-f(x[3]) )²+...+( y[n]-f(x[n]) )².

In addition, it is known that there are adaptations where a weight is associated with each argument and result relation ([x[1],y[1],p[1]] , [x[2],y[2],p[2]] , [x[3],y[3],p[3]] , ... , [x[n],y[n],p[n]]) to define the relevance of each data and focus greater precision on them, making the error that is minimized measured by the formula p[1]*( y[1]-f(x[1]) )²+p[2]*( y[2]-f(x[2]) )²+p[3]*( y[3]-f(x[3]) )²+...+p[n]*( y[n]-f(x[n]) )².

There are also adaptations where data associations are not defined discretely but continuously, where x is defined as a range of a parameter (or a region of several parameters), y is defined as a function in that range, if there is weight p is also defined as a function in the range and the error formula does not sum discrete values but rather integrates continuous values in the range (Integral( x=x[0]..x[1] , p(x)*(y(x)-f(x))² dx )), therefore it is more appropriate to use functions that result in an integrable function integral (or at least have a good numerical integration rule).

Linearity of the problem

The most interesting thing is that the result is a system solution of linear equations when f follows the linear model for each coefficient because

  • the variables are the coefficients,
  • the equations are derived from the error formula for each coefficient equalled to zero
  • and error derivatives always result in linear expressions when f follows such a linear model.

Easing error measures via formula control

It is noticed that each equation of the system treats the minimization of sum of squares by means of the derivative in one of the coefficients. Perhaps the choice of a coefficient whose influence on the minimization of squares will be ignored to apply another type of approximation (i.e., the choice of one equation of the system to be exchanged for another) may modify the error measure favorably to another criterion.

For example, another way to reduce errors with linear equations is to equal an approximate value to its exact value in such a way that in its surroundings there is high precision. Equations can be used for this purpose. Another way is to match the errors of two approximations so that the more accurate lose accuracy, the less accurate gain and so the greater error decreases.

Easing error measures via weight control

It is understood that when there are no weights (or we define weights always equal to 1), each residue is of the form y[i]-f[i], when weights are used p[i]=1/y[i]² the expressions squared are replaced by the form (y[i]-f[i])/y[i], as a processing of waste from absolute to relative behaviour, but still the minimized error is the sum of waste squares. And if the error you want to minimize was another, such as the maximum waste module or the sum of modules?

For example, given x=[1,2,3,4,5,6], y=[8,9,9,10,10,11] and f(x)=c[1]+x*c[2] (therefore o=2 and n=6),

  • without weights the result is f(x)=(266+19*x)/35 and the waste is [1/7 , -11/35 , 8/35 , -8/35 , 11/35 , -1/7],
  • already with weights [1,2,1,1,2,1] the result is f(x)=(31+2*x)/4 and the waste is [1/4, -1/4, 1/4, -1/4, 1/4, -1/4].

What is special about the second solution? Any weight change causes an increase in the maximum residue module, which is 0.25 (the other, without weights, is 0.3143, so you can make all the waste have modules below that simply by controlling the weights). A good choice in weights can result in the desired error measure, minimizing it by the criterion you find most convenient.

Question

There is an algorithm that makes curve adjustment as the MQO with greater control of the error measure that will be minimized, either from another method (based or not on MQO) or with the MQO itself including the calculation of the ideal weights?

Preferably, maintain the linearity property, aiming for greater certainty of solution and performance (i.e., if possible avoiding convergence-dependent iterations). Also possible to circumvent error testing on iterative weight changes so that too much MQO is not applied.

Edit: as well as MQO already deals specifically with the sum of squares, algorithms that specifically deal with the summation criterion of modules and/or maximum module criterion are accepted (because they are the extremes and the most important ones)but it is interesting to have the possibility of generalized definition.

  • This is more a master’s thesis than a question about programming , however the practical application is visible.

  • In fact, this last edition is exactly because I already have an idea of how to solve and implement to test in the application I need. Still, it may be that they propose something already studied previously. Maybe it is not new or master’s work.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.