synthval.metrics.FrechetDistance ================================ .. py:class:: synthval.metrics.FrechetDistance(eps = 1e-06) Bases: :py:obj:`SimilarityMetric` Similarity Metric that computes the Frechet distance (also known as Fréchet Inception Distance) between two distributions by comparing their means and covariances. When applied to features extracted from the last average pooling layer of the Inception model (e.g., those provided by synthval.features_extraction.InceptionExtractor), it corresponds to the standard Frechet Inception Distance. .. attribute:: eps Small offset added to the covariance matrices to handle numerical issues such as matrix singularity (default: 1e-6). :type: float, Optional .. rubric:: References Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Sepp Hochreiter - GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium - Annual Conference on Neural Information Processing Systems, 2016. .. py:method:: calculate(real_dist_df, synth_dist_df) Compute the Frechet distance between two distributions by comparing the mean and covariance of the samples provided. :param real_dist_df: Set of samples representing distribution real_dist. :type real_dist_df: pandas.DataFrame :param synth_dist_df: Set of samples representing distribution synth_dist. :type synth_dist_df: pandas.DataFrame :returns: A numpy array containing the Frechet Distance. :rtype: numpy.ndarray