optimization function in R that can accept objective, gradient, AND hessian?

I have a complex objective function I am looking to optimize. The optimization problem takes a considerable time to optimize. Fortunately, I do have the gradient and the hessian of the function available.

Is there an optimization package in R that can take all three of these inputs? The class 'optim' does not accept the Hessian. I have scanned the CRAN task page for optimization and nothing pops.

For what it's worth, I am able to perform the optimization in MATLAB using 'fminunc' with the the 'GradObj' and 'Hessian' arguments.

Answers


I think the package trust which does trust region optimization will do the trick. From the documentation of trust, you see that

This function carries out a minimization or maximization of a function using a trust region algorithm... (it accepts) an R function that computes value, gradient, and Hessian of the function to be minimized or maximized and returns them as a list with components value, gradient, and hessian.

In fact, I think it uses the same algorithm used by fminunc.

By default fminunc chooses the large-scale algorithm if you supply the gradient in fun and set GradObj to 'on' using optimset. This algorithm is a subspace trust-region method and is based on the interior-reflective Newton method described in [2] and [3]. Each iteration involves the approximate solution of a large linear system using the method of preconditioned conjugate gradients (PCG). See Large Scale fminunc Algorithm, Trust-Region Methods for Nonlinear Minimization and Preconditioned Conjugate Gradient Method.


Need Your Help

Loading custom cell value from array depending on users choice in Swift

arrays swift uitableview custom-cell

I have an uitableview with custom cell. Custom cell contains a label and two buttons.

PHP MySQL DB query error

php mysql

I am trying to get the top 10 items from a table:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.