synthval.metrics.MeanMahalanobisDistance#

class synthval.metrics.MeanMahalanobisDistance#

Bases: SimilarityMetric

Similarity Metric computing the mean of the estimated Mahalanobis Distances between all the samples of the real_dist distribution and the synth_dist distribution (the estimation is due to the use of the numpy.cov method to compute the covariance matrix of the synth_dist distribution).

calculate(real_dist_df, synth_dist_df)#

Compute an estimation of the Mahalanobis Distance between two distributions as a mean of the Mahalanobis Distance computed over each sample of the first against the second.

Parameters:
  • real_dist_df (pandas.DataFrame) – Set of samples representing distribution real_dist.

  • synth_dist_df (pandas.DataFrame) – Set of samples representing distribution synth_dist.

Returns:

A numpy array containing the estimated mean Mahalanobis Distance.

Return type:

numpy.ndarray