My Math Forum  

Go Back   My Math Forum > Math Forums > Math Software

Math Software Math Software - Mathematica, Matlab, Calculators, Graphing Software


Reply
 
LinkBack Thread Tools Display Modes
January 13th, 2017, 04:27 AM   #1
Newbie
 
Joined: Jan 2017
From: UK

Posts: 4
Thanks: 0

Robust linear estimation to estimate parameters in Java

Hi guys!
I am working on a project and I need to perform a robust linear estimation as described here:
https://postimg.org/image/t9b9fybtt/

I have to do this to the equation 43:
https://postimg.org/image/x4eniiuzl/

I have assumed that the final function that I have to minimize, basing on both papers,
is:
Sumatory of Xi*sgn(Yi+(b^2 - (Ymedian-n*Xmedian)^2 )+ n*Xi)


and the median of X and Y data being: VF = median {yi − n*xi}
(I am assuming VF equals to that as it is stated in the 1st pdf ) (with VF being the omega letter.)

then, this function, minimized (by bisection) should give me the n and VF values correctly fixed. However, it doesn't.
this is therefore why I think I am mistaken in something, for instance in the grasping of the problem or the process.


it is supposed to be easy, just minimizing the function I have talked about above by bisection, but as it is giving me uncorrect results, I am really confused. I think I am doing something bad in the process.
Hence, I am questioning "my process" to see where I have failed. So that I have the following points/questions in which I may have failed:
-The equation 43 of the second paper, is the target to initially be minimized. As explained in the paper(the first), I have to turn the "target function" into another function (the one with the sgn) which is now the one I have to minimize. So well, in the first paper it appears with negatives signs in their variables, but as the initially target function (the equation 43 of the 2nd paper) has positive signs, I kept them. I did so, because I assumed that the second paper gave me the function already ready to be minimized by that method, and also, as it is shown in other parts of the pdf (2nd one, but I did not upload that parts), that function (without any summatory nor absolute values of course, but the rest remains the same) equals 0. I supposed that it means that no subtraction/difference of "errors" was required(I mean the calculation tipically used for this kind of problems: real data-calculated/predicted data was not necessary), because the function itself yields 0, so that if the parameters are mistaken, the result won't be 0, so just by minimizing the function in its original way it should work. (or at least this is what I guessed)
Only in the calculation of "VF" (of the difference between the medians) I have used a subtraction.
So this is the first point I am confused about, How should I pose the final function to be minimized (the one with the sgn)?
Should it keep its initial form as shown in the 2nd paper, with the variables summing?, or should I put negatives signs as shown in the 1st paper?.

-In the 1st paper, it states that in order to minimize that function, before using bisection, estimations of the parameters by least-squares have to be done.
I have not done that, nor needed any initial guess of that parameters to do the bisection, I do not see any need of that indeed. Why is it used for? I mean, Why does this paper use this?.
However, I have to say that I do know the interval in which the parameters that should minimize the function lie.



Well, summing up, I have posed the final function to be minimized as follows:
Sumatory of Xi*sgn(Yi+(b^2-(Ymedian-n*Xmedian)^2)+ n*Xi)

with VF = {Ymedian − n*Xmedian}

I use the bisection method, after some iterations it gives me mistaken results.
I use bisection in the following way:
C= (a+b)/2.0; A,B and C are different points of the X axis of the n parameter.
Once C, A and B are equal enough, I stop the iterations-process.
and I assume that n=A=B=C and that, basing on the lasts prescriptions,
Vf= Ymedian-C*Xmedian.


The java code that I used to do this is the following:
https://postimg.org/image/ode5osstl/


I do not know what is failing
I hope you can help me
thanks for reading !
BlueMath is offline  
 
Reply

  My Math Forum > Math Forums > Math Software

Tags
estimate, estimation, java, linear, parameters, robust



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to perform Robust linear estimation to estimate parameters BlueMath Probability and Statistics 1 January 13th, 2017 04:28 AM
Estimation of Loss Distribution Parameters. mathmaster135711 Advanced Statistics 0 December 2nd, 2016 07:08 AM
Linear Algebra + three equations and two parameters njeks Math 2 March 20th, 2015 12:25 PM
Use linear approximation to estimate the larger root nothingisimpossible Calculus 1 August 14th, 2013 07:56 AM
Robust optmization problem hermano Algebra 1 August 24th, 2011 12:46 PM





Copyright © 2017 My Math Forum. All rights reserved.