  Estimating the ratio of two probability densities from finitely many
observations of the densities, is a central problem in machine learning and
statistics. A large class of methods constructs estimators from binary
classifiers which distinguish observations from the two densities. However, the
error of these constructions depends on the choice of the binary loss function,
raising the question of which loss function to choose based on desired error
properties. In this work, we start from prescribed error measures in a class of
Bregman divergences and characterize all loss functions that lead to density
ratio estimators with a small error. Our characterization provides a simple
recipe for constructing loss functions with certain properties, such as loss
functions that prioritize an accurate estimation of large values. This
contrasts with classical loss functions, such as the logistic loss or boosting
loss, which prioritize accurate estimation of small values. We provide
numerical illustrations with kernel methods and test their performance in
applications of parameter selection for deep domain adaptation.
