qolmat.benchmark.metrics.frechet_distance¶
- qolmat.benchmark.metrics.frechet_distance(df1: DataFrame, df2: DataFrame, df_mask: DataFrame, method: str = 'single', min_n_rows: int = 10) Series[source]¶
Compute Frechet distance computed using a pattern decomposition.
Several variant are implemented: i) the single method relies on a single estimation of the means and covariance matrix. It is relevent for MCAR data. ii) the pattern method relies on the aggregation of the estimated distance between each pattern. It is relevent for MAR data.
- Parameters
- df1pd.DataFrame
First empirical distribution
- df2pd.DataFrame
Second empirical distribution
- df_maskpd.DataFrame
Mask indicating on which values the distance has to computed on
- method: str
Method used to compute the distance on multivariate datasets with missing values. Possible values are robust and pattern.
- min_n_rows: int
Minimum number of rows for a KL estimation
- Returns
- pd.Series
Series of computed metrics