Hi Ravi, Thank you for your reply and please excuse my late response.
Plugging w2 = k/w1 from (A) into (B) yields (C) f(w1') = (w1-w1)^2 + (w2-k/w1)^2 The partial derivative wrt w1' is (D) df(w1')/ dw1' = -2(w1-w1) + 2(w2-k/w1)*k/(w1')^2 in order for this to be a minimum the f.o.c. df(w1')/ dw1' = 0 and the s.o.c. d^2f(w1')/ d(w1')^2 >0 must be satisfied. I follow you on substituting the constraint into the distance from the iterate to (w1', w2') and then minimizing this distance, but I'm not quite sure how to turn this into a projection function. Any suggestions? Regards, Kristian 2011/9/8 Ravi Varadhan <rvarad...@jhmi.edu> > Hi Kristian,**** > > ** ** > > The idea behind projection is that you take an iterate that violates the > constraints and project it onto a point such that it is the nearest point > that satisfies the constraints. **** > > ** ** > > Suppose you have an iterate (w1, w4) that does not satisfy the constraint > that w1 * w4 != (1 + eps)/2. Our goal is to find a (w1, w2), given (w1, > w2), such that**** > > ** ** > > **(A) **w1 * w2 = (1+eps)/2 = k**** > > **(B) **(w1-w1)^2 + (w2-w2)^2 is minimum. **** > > ** ** > > This is quite easy to solve. We know (w1, w2). You plug in w2 = k/w1 > from (A) into (B) and minimize the function of w1. This is a simple > calculus exercise, and I will leave this as a homework problem for you to > solve!**** > > ** ** > > Best,**** > > Ravi.**** > > ** ** > > -------------------------------------------------------**** > > Ravi Varadhan, Ph.D.**** > > Assistant Professor,**** > > Division of Geriatric Medicine and Gerontology School of Medicine Johns > Hopkins University**** > > ** ** > > Ph. (410) 502-2619**** > > email: rvarad...@jhmi.edu**** > > ** ** > [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.