Hi, I have written an R translation of C.T. Kelley's Matlab version of the Nelder-Mead algorithm. This algorithm is discussed in detail in his book "Iterative methods for optimization" (SIAM 1999, Chapter 8). I have tested this relatively extensively on a number of smooth and non-smooth problems. It performs well, in general, and it almost always outperforms optim's implementation of Nelder-Mead. I have obtained written permissions from both SIAM (publishers of Kelley's text) and from C.T. Kelley himself to make this publicly available in R.
I have been planning on releasing this function either as a separate package or as one of the algorithms in a package containing derivative-free methods. However, it was recently suggested to me by Soren Hosgaard that a better option would be to incorporate this as part of `optim' itself, either replacing existing Nelder-Mead or as another `method' in optim, so that it will be more widely used. Would anyone from the R-core be interested in incorporting this into optim? It should be mentioned that my code is entirely written in R. Therefore, speed gains could be achieved if translated into C (I am not proficient in C). 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
--- Begin Message ---Dear Ravi, A possible alternative to releasing this as an R-package (there are already 2200+ packages now) could be to approach the R-core (specifically I am thinking about Martin Maechler) to suggest that your contribution would be included as an option (possibly even the default) in optim(). Best regards Søren ________________________________________ Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] På vegne af Ravi Varadhan [rvarad...@jhmi.edu] Sendt: 5. marts 2010 16:21 Til: stephen sefick Cc: r-h...@r-project.org Emne: [R] Improved Nelder-Mead algorithm and Matlab's fminsearch. Was: Hi The `fminsearch' in Matlab uses a version of the Nelder-Mead simplex search algorithm, which is a derivative-free search technique. The Nelder-Mead is also the default algorithm in optim(). Therefore, you can simply call optim() to get your job done. However, I would like to mentiion that the Nelder-Mead implementation in optim() is not the best, and I have had others (who use Matlab) tell me that `fminsearch' generally performs better than optim's Nelder-Mead. I have written an improved version of Nelder-Mead that performs better than optim's Nelder-Mead. Iwill soon release it as a package (I have been saying this for several months now!), but I can send it to you if you are interested. Hope this helps, 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 ----- Original Message ----- From: stephen sefick <ssef...@gmail.com> Date: Thursday, March 4, 2010 4:02 pm Subject: Re: [R] Hi To: hussain abu-saaq <hussain...@hotmail.com> Cc: r-h...@r-project.org > I would help, but I don't know matlab. > > Stephen > > On Thu, Mar 4, 2010 at 2:50 PM, hussain abu-saaq > <hussain...@hotmail.com> wrote: > > > > How Can I write this this matlab code in R: > > > > > > > options=optimset('TolFun',1e-9,'TolX',1e-9,'MaxIter',1e8,'MaxFunEvals',1e8); > > c=c/2; > > [alpha, delta, epsilon, nofcup] = ustrs(set_date,mat_date); > > y = fminsearch('pbond',.15,options,p,c,nofcup,delta/epsilon); > > y = 200*y; > > > > > > > > Note > > pbond is a function in Matlab I already wrote in R > > > > > > ustrs is a function in Matlab I already convert into r > > > > > > Thank you > > > > HI > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > r-h...@r-project.org mailing list > > > > PLEASE do read the posting guide > > and provide commented, minimal, self-contained, reproducible code. > > > > > > -- > Stephen Sefick > > Let's not spend our time and resources thinking about things that are > so little or so large that all they really do for us is puff us up and > make us feel like gods. We are mammals, and have not exhausted the > annoying little problems of being mammals. > > -K. Mullis > > ______________________________________________ > r-h...@r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ r-h...@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.
--- End Message ---
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel