A density ratio framework for evaluating the utility of synthetic data