help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finite Differences for gsl_multilarge_nlinear functions


From: address@hidden
Subject: Finite Differences for gsl_multilarge_nlinear functions
Date: Mon, 4 Sep 2023 17:35:03 GMT

I've been trying to use the gsl_multilarge_nlinear library to try to optimize a 
function, and I'm trying to use finite differences for the Jacobian function.  
I've set my fdf params as follows:

gsl_multifit_nlinear_parameters fdf_params = 
gsl_multifit_nlinear_default_parameters(); fdf_params.solver = 
gsl_multifit_nlinear_solver_mcholesky;
 fdf_params.fdtype = GSL_MULTIFIT_NLINEAR_FWDIFF;
 fdf_params.h_df = 0.1; I also set the function to be minimized as follows: // 
define the function to be minimized
 fdf.f = myfunc_f;
 fdf.df = NULL; // set to NULL for finite-difference Jacobian
 fdf.fvv = NULL; // not using geodesic acceleration
 fdf.n = n;
 fdf.p = p;
 fdf.params = &d;
The solver doesn't seem only does one iteration before exiting.  Iprintf'ed the 
function and the parameters seem to stay the same as follows:

par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
iter 0: par0=1.0000, par1=1.0000, par2=1.0000, par3=1.0000, par4=1.0000, 
par5=1.0000, par6=1.0000, cond(J)= 1.0000, |f(x)|=0.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000
par0=1000.0000, par1=100.0000, par2=1000000.0000, par3=1000000.0000, 
par4=1.0000, par5=1.0000, par6=10.0000

I did look into the code, and, for multilarge, saw that the code had been 
deactivated:

https://github.com/ampl/gsl/blob/9949570bd7bc7b865d122de6cdbb3e70d3ee19f6/multilarge_nlinear/fdf.c#L504

(I know it's not the GNU repo, but the code is the same.) Are there plans to do 
this in the future, and are there alternatives that I can take? Thanks,Leo 
Andres


reply via email to

[Prev in Thread] Current Thread [Next in Thread]