:py:mod:`synthgauge.metrics.density` ==================================== .. py:module:: synthgauge.metrics.density .. autoapi-nested-parse:: Mean absolute difference in feature densities. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: synthgauge.metrics.density.feature_density_mad .. py:function:: feature_density_mad(real, synth, feats=None, bins=10) Mean absolute difference of feature densities. For each feature the difference between the density across the bins within `real` and `synth` is calculated. Finally the MAE across all features and bins is calculated. A value close to 0 indicates that the real and synthetic datasets have a similar set of feature distributions. :param real: DataFrame containing the real data. :type real: pandas.DataFrame :param synth: DataFrame containing the sythetic data. :type synth: pandas.DataFrame :param feats: The features that will be used to compute the densities. If `None` (default), all common features are used. :type feats: list of str or None, default None :param bins: Binning method for discretising the data. Can be anything accepted by `numpy.histogram_bin_edges`. Default uses 10 bins. :type bins: str or int, default 10 :returns: Mean absolute error of feature densities. :rtype: float