Optimizing Approximate Leave-one-out Cross-validation to Tune Hyperparameters