Efficient learning methods to tune algorithm parameters