Closed arrjon closed 3 months ago
That the nllh
is inf
seems also to be the case if one disables the hierachical optimization (this is also true for the older pypesto verisions 0.4.1 and 0.4.2) @PaulJonasJost
The problem lies in the observable mapping: parameters which are replaced by parameters from the petab measurement file cannot change with the condition. If you define them explicitly and replace them using the petab condition file, it works. However, then hierachical optimization is not supported anymore.
However, the behaviour of pypesto is very strange in that case and I would expect failure at some point since the opimizations only returns inf
, but continues anyway.
The problem lies in the observable mapping: parameters which are replaced by parameters from the petab measurement file cannot change with the condition.
To confirm, we showed this is not true, right?
The issue with hierarchical optimization was coming up due to some non-intended logarithms of 0, look at #1377
In the case of non-hierarchical optimization, the issue turned out to be not-ideal parameter bounds for the sigma parameters: the lower bound was set to 0, and it was possible to fit very well, so the optimizer pushed the noise parameter to exactly 0 which caused problems.
So this issue should be resolved with #1377
Indeed, #1377 solves the problems! Thank you!
Bug description Hierachical optimization with multipe conditions fails in the specific case if one has multiple conditions and observables specific to that condition. Amici returns zeros for those observables which are not seen in a condition and it seems like this is not correctly handled within pyPESTO.
These error occur
and not even one single start fails or stops. It just runs forever. I debugged the
nllh
value and it is always-inf
.To reproduce I attached a minimal petab problem to recreate the issue. test.zip
It is a minimal parameter estimation problem with two conditions. The model produces an observable
y
which is then mapped via an observable mapping to eitherobs_y_1 = scaling_obs_y_1 * y + offset_obs_y_1
orobs_y_2 = scaling_obs_y_2 * y + offset_obs_y_2
. Measurements forobs_y_1
are only given by under the conditioncondition1
andobs_y_2
only forcondition2
.Environment
pypesto
version: current develop branchpython3.9