Sometimes, one wants to have hierarchically optimized parameters (e.g. sigmas), but also confine them to some box constraints [lb ub]. Therefore, having computed the optimal parameters in the inner loop, check if they stay in the box (if one was passed), and set them to the left or right boundary if not.
Sometimes, one wants to have hierarchically optimized parameters (e.g. sigmas), but also confine them to some box constraints [lb ub]. Therefore, having computed the optimal parameters in the inner loop, check if they stay in the box (if one was passed), and set them to the left or right boundary if not.