I am excited to try parameter estimation on my model using DiffEqParamEstim.jl package. I thought of trying out some examples in the documentation and then choose the best method for my model. But I found some of those examples not working for me.
Example of Lotka-Volterra Equation with 4 parameters is the one I have tried. But after optimization using the package Optim.jl with BFGS algorithm, rendered status failure as the line search failed. Can I get a helping hand on this?
Also can I know if the same strategy in this example can be extended to a large system of differential equations with around 15 parameters to estimate?
Thanks in advance!
Here is the code in detail with the package versions I deal with.
using DiffEqParamEstim, DifferentialEquations,RecursiveArrayTools, Optim function f2(du,u,p,t) du = dx = p*u - p*u*u du = dy = -p*u + p*u*u end u0 = [1.0;1.0] tspan = (0.0,10.0) p = [1.5,1.0,3.0,1.0] prob = ODEProblem(f2,u0,tspan,p) sol = solve(prob,Tsit5()) t = collect(range(0,stop=10,length=200)) randomized = VectorOfArray([(sol(t[i]) + .01randn(2)) for i in 1:length(t)]) data = convert(Array,randomized) cost_function = build_loss_objective(prob,Tsit5(),L2Loss(t,data), maxiters=10000,verbose=false) result_bfgs = Optim.optimize(cost_function, [1.3,0.8,2.8,1.2], Optim.BFGS())