We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following example: https://diffeq.sciml.ai/stable/analysis/parameter_estimation/#Optimization-Based-ODE-Inference-Examples If one makes an L2Loss there is nothing that stops one from doing:
L2Loss
using DiffEqParamEstim, DifferentialEquations, Plots, RecursiveArrayTools function f(du, u, p, t) du[1] = dx = p[1] * u[1] - u[1] * u[2] du[2] = dy = -3 * u[2] + u[1] * u[2] end u0 = [1.0; 1.0] tspan = (0.0, 10.0) p = [1.5] prob = ODEProblem(f, 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 = copy(convert(Array, randomized)') # this is the problem model_ode(p_) = ODEProblem(f, u0, tspan, p_) loss_objective = build_loss_objective(prob, Tsit5(), L2Loss(t, data); prob_generator=(prob, p) -> model_ode(p))
however, this will result in a crash of Julia. since in
DiffEqParamEstim.jl/src/cost_functions.jl
Line 54 in fc541ed
data
The text was updated successfully, but these errors were encountered:
The same is true if one uses a PeriodicCallback. In this case sol.t might not be equal to loss.t.
PeriodicCallback
sol.t
loss.t
Sorry, something went wrong.
I missed this email. That is a good point: it should check the bounds and throw an error before proceeding.
No branches or pull requests
Consider the following example: https://diffeq.sciml.ai/stable/analysis/parameter_estimation/#Optimization-Based-ODE-Inference-Examples
If one makes an
L2Loss
there is nothing that stops one from doing:however, this will result in a crash of Julia. since in
DiffEqParamEstim.jl/src/cost_functions.jl
Line 54 in fc541ed
the correct dimension of
data
is assumed.The text was updated successfully, but these errors were encountered: