I have a sample of 5000 doubles like
sample = {1.23, -4.67, 0.17, 1.25, 6.89, -2.03, ...}
and want to fit the data to a parametric distributions like N(mu, sigma) or generalized student t(loc, scale, DoF)...
I already have the PDFs of these distributions PDF_normal(mu, sigma)(x) and PDF_t(loc, scale, DoF)(x) and can calculate the sum of the logarithms of the PDFs for the 5000 samples for fixed distribution parameters.
Now, I want to use some C++ algorithms for solving nonlinear optimization problems to find the parameters (mu_max, sigma_max) or (loc_max, scale_max, DoF_max) that will give me the max-log-likelihood values.
The R Project for Statistical Computing is solving the problem with in the MASS package in the following way: .. direct optimization of the log-likelihood is performed using optim. The estimated standard errors are taken from the observed information matrix, calculated by a numerical approximation. For one-dimensional problems the Nelder-Mead method is used and for multidimensional problems the BFGS method...
Unfortunately, I cannot use the R solution but have to come up with a solution in Microsoft VS2010 C++ and I don't want to write the optimization code by myself and I dont want to look at the R source code and rewrite it for C++...
Any suggestions where I can find a fast and well tested implementation of BFGS (or similar) for C++?
Is there anything available in Boost, Intel MKL, etc?
Thanks for your help, Matt