SciML / diffeqpy

Solving differential equations in Python using DifferentialEquations.jl and the SciML Scientific Machine Learning organization
MIT License
508 stars 39 forks source link

Does this support sensitivity analysis? #103

Closed Ge0rges closed 1 year ago

Ge0rges commented 1 year ago

Hello,

I was wondering if this package supports the sensitivity analysis function of the original Julia package.

Specifically, can I run the Julia code below in python?

f1 = function (p)
  prob1 = remake(prob;p=p)
  sol = solve(prob1, Rosenbrock23(); saveat=collect(range(0, stop=duration, length=200)), maxiters=Int(1e6))
  [last(sol[1,:])]
end

sobol_result = GlobalSensitivity.gsa(f1, Sobol(), p_range, N=1000)
ChrisRackauckas commented 1 year ago

It doesn't import/export GlobalSensitivity.jl, so you'd have to directly use pyjulia calls to get GlobalSensitivity. But if you do, then it should work fine.