help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixed points piecewise-linear fitting


From: Sergei Steshenko
Subject: Re: fixed points piecewise-linear fitting
Date: Sat, 17 Mar 2012 11:19:47 -0700 (PDT)




----- Original Message -----
> From: CdeMills <address@hidden>
> To: address@hidden
> Cc: 
> Sent: Saturday, March 17, 2012 7:30 PM
> Subject: Re: fixed points piecewise-linear fitting
> 
> 
[snip]
> Is your problem about robust identification ? 
> - if you want to solve it directly, see
> https://en.wikipedia.org/wiki/Least_absolute_deviations
> 
> -In any case, the function to be minimised do possess a first derivative,
> but it is not continuous. So the second derivative does not exist
> everywhere, and usual optimisation algorithms will not converge, as the
> evolution of the cost function upon the parameter set is jumpy. 
> Maybe you could try something similar but continuous like regression based
> upon the hyperbolic cosine. In this case, the steps are 
> 1) get an a priori, robust estimate of the variance, S
> 2) minimise sum(cosh(yinterp - y)/S)
> 
> Pascal 
> 
> --

I quickly read the article and "it doesn't quite ring the bell".

I again suggest to perform web search on this thread subject - my quick 
impression is that some trial and error/heuristic methods are used by others 
too, so my brute force trial and error method is probably not that stupid.

I must also confess that, say, reading a solution (I think) for R-language 
(IIRC there is a package implementing it) I met too many terms I don't know. I 
think the terms are from statistics - not my strong point, and my data has 
nothing to do with statistics. Also, nothing at all is known about derivatives 
- just some kind of measured data with no known analytical function. Had i know 
analytical function for the data, I would have done a lot fo things differently 
in the "global" mission.

So I decided to write my naive simplistic implementation - it was pretty easy. 
It was also easy because I call such kind of solutions "eye and fingers 
solution" - I as a human would solve the problem that way using my eyes and 
fingers. By the way, this approach works often quite well.

Regarding the problem - the key difficulty is that it is _piecewise_-linear. 
I.e. fitting just _one_ piece is trivial, but the pieces, if fit separately, 
won't connect into a piecewise-liner curve (or I better say line).

...

To make trial and error methods for this case look more scientific one can wrap 
them in something like Levenberg-Marquardt algorithm. I.e. not blindly try to 
change all Yf, but to first try from those Yf which affect the result most. 
which, of course, still does not guarantee mathematical correctness.

Regards,
  Sergei.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]