ICB-DCM / pyPESTO

python Parameter EStimation TOolbox
https://pypesto.readthedocs.io
BSD 3-Clause "New" or "Revised" License
207 stars 45 forks source link

Waterfall plot error: `order_by_id` and `start_indices` do not work together #1368

Closed plakrisenko closed 3 months ago

plakrisenko commented 3 months ago

Bug description If order_by_id is True and start_indices is set it may cause an IndexError. E.g.:

line 133, in waterfall
     if fvals_raw_is_finite[start_index]:
IndexError: index 85 is out of bounds for axis 0 with size 10

Here, there were 100 starts overall, but start_indices was set to 10. The issue is that the best 10 starts are selected for each results before the ordering.

Expected behavior I think it would make sense if results were ordered first and then starts were selected according to specified start_indices.

To reproduce Should be reproducible with two results that have different start order when sorted by fval.

Environment