Skip to content

Commit

Permalink
Chi-squared only at final time point
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelbosch committed Nov 14, 2023
1 parent d63ba23 commit 86362cb
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions ext/DiffEqDevToolsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,6 @@ end

function _add_prob_errors!(out, sol, ref)
out.errors[:chi2_final] = chi2(sol.pu[end], ref.u[end])[1]
if :l2 in keys(out.errors)
# out.errors[:chi2_steps] = sum(chi2.(sol.pu, ref.(sol.t)))
# This is hard to evaluate as it follows a distribution that depends on the number
# of steps taken. Therefore, don't compute it for now!
end
if :L2 in keys(out.errors)
densetimes = collect(range(sol.t[1], stop=sol.t[end], length=100))
interp_pu = sol(densetimes).u
interp_ref = ref(densetimes).u
out.errors[:chi2_interp] = sum(chi2.(interp_pu, interp_ref))
end
return out
end

Expand Down

0 comments on commit 86362cb

Please sign in to comment.