Added helper functions to switch hyperparameter sampling on and off