The functions l and g are Parzen estimators, otherwise known as kernel density estimators. These model the probability density of θ by placing truncated Gaussian distributions over each observation of a continuous hyperparameter, and a categorical distribution proportional to the observed counts of each level for each discrete hyperparameter. More details can be found in Bergstra et al. This method can also be extended to dual objective functions, i.e., when optimizing two (or more) responses, y i = (y