The output range of my regression prediction is [1, 30], while most targets are lower than 2.
When I generate counterfactuals with an expected output of 10 or more for a particular instance, the generate_Counterfactuals function runs for a long time without producing a result.
It normally takes only a few seconds to generate a result (expected counterfactual output in [1,5]).
How can I make the generate_Counterfactuals function stop automatically if it's hard to find counterfactuals (similar to neural network training)