  Combining machine learning and constrained optimization, Predict+Optimize
tackles optimization problems containing parameters that are unknown at the
time of solving. Prior works focus on cases with unknowns only in the
objectives. A new framework was recently proposed to cater for unknowns also in
constraints by introducing a loss function, called Post-hoc Regret, that takes
into account the cost of correcting an unsatisfiable prediction. Since Post-hoc
Regret is non-differentiable, the previous work computes only its
approximation. While the notion of Post-hoc Regret is general, its specific
implementation is applicable to only packing and covering linear programming
problems. In this paper, we first show how to compute Post-hoc Regret exactly
for any optimization problem solvable by a recursive algorithm satisfying
simple conditions. Experimentation demonstrates substantial improvement in the
quality of solutions as compared to the earlier approximation approach.
Furthermore, we show experimentally the empirical behavior of different
combinations of correction and penalty functions used in the Post-hoc Regret of
the same benchmarks. Results provide insights for defining the appropriate
Post-hoc Regret in different application scenarios.
