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: CdeMills
Subject: Re: fixed points piecewise-linear fitting
Date: Sat, 17 Mar 2012 10:30:36 -0700 (PDT)

Sergei Steshenko-2 wrote
> 
> 
> 
> Well, in my case it's just sum(abs(Yf_interpolated - Y)), not
> sum((Yf_interpolated - Y).^2).
> 
> I don't understand your "A linear solution would work".
> 
> 
> My solution is poor man's brute force one.
> 
> I.e. I have a pretty good Yf initial approximation, and I have Y_step.
> 
> I have an outer loop which is iterations and an inner loop on 'k'
> 
> For each Yf(k) I try (Yf(k) + Y_step) and (Yf(k) - Y_step) and check
> whether my sum(abs(Yf_interpolated - Y)) becomes smaller or not.
> 
> If it is smaller, Yf(k) is replaced with Yf(k) +/- Y_step - depending on
> which of them gives smaller sum(abs(Yf_interpolated - Y)).
> 
> The outer loop is run until there is no improvement in
> sum(abs(Yf_interpolated - Y)) or until number of iterations is exhausted -
> in my case very good fitting is not critical. In my case I never reach
> iterations limit - I intentionally make it hight; for my data I think I
> never have more than 200 iterations.
> 
> In my case length(Yf) == length(Xf) == 64.
> 
> Of course, I have no mathematical proof that I am reaching the global
> minimum of sum(abs(Yf_interpolated - Y)). Typically
> sum(abs(Yf_interpolated - Y)) becomes about 2 times smaller than it was
> for initial Yf, i.e. in practice I see that my algorithm improves fitting.
> 
> My dirty little secret is that probably in my case initial Yf
> approximation would do :).
> 
> 
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 

--
View this message in context: 
http://octave.1599824.n4.nabble.com/fixed-points-piecewise-linear-fitting-tp4480432p4480927.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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