Fix division by zero in StopWhenReturnsDiminish criterion#15
Fix division by zero in StopWhenReturnsDiminish criterion#15stepankonrad wants to merge 1 commit intodthuerck:masterfrom
Conversation
|
Hi @stepankonrad, thanks for contributing! You're absolutely right, a 0-objective would cause a 0-division - shame on me :/ On the modelling side, the best possible solution is adding a bias pushing the global minimum to 0 or above. Otherwise, there's all sorts of stuff that could go wrong (think sequences 20 -> 10 -> 0 -> -10 -> -20 or 10 -> -10). This would gracefully handle negative costs by biasing the expected loss the average. Does it solve you problem? |
Hi @dthuerck,
this happens for example if the graph doesn't have any edges.
Is this the right way to terminate? Can the cost go below 0?
Best,
Stepan