Closed JunmiHu closed 1 month ago
Fixed by ecd7de58
The problem was that the initial ensemble was assumed to be provided in the unconstrained space, and so the mismatch was due to the transform not being applied. This is obviously counter-intuitive and has been corrected.
Thanks for reporting the issue.
Regression test can be found here.
Description Providing the initial_ens to the inference problem does not actually perform the simulation using the initial ensemble, but rather seems to generate a new ensemble using the prior to use as the initial ensemble. This seems to occur for EnIS, ES-MDA, and EKS. I have not tested this for the other algorithms.
To Reproduce I have provided an example code below based on the linearode example to reproduce the issue for the EnIS() simulation. Note, however, that changing the inference algorithm to ES-MDA or EKS yields the same non-expected initial ensemble.
When running this code, I obtain that init_ens and true_ens are not the same. This can also be seen for the initial ensembles for the ES-MDA and EKS solvers.
Expected behavior I would expect the println statement in the problem_simulation function to print out the given initial ensemble. However, as seen, the two are different. I believe the current behavior is not intended.
Notes on the issue In the EnIS case, this seems to be due to a premature call to prob.prob_func in SciMLBase/src/ensemble/basic_ensemble_solve.jl#L183:
new_prob = prob.prob_func(_prob, i, iter)
, which updates the ensembles based on the definition of the prob_func in SimulationBasedInference/src/ensembles/ensemble_solver.jl#L237-241:System Info OS: MacOS 14.4.1 julia version: 1.10.4
Let me know if you need any more information. Thank you for taking the time to develop the package!