qolmat.benchmark.metrics.pattern_based_weighted_mean_metric¶
- qolmat.benchmark.metrics.pattern_based_weighted_mean_metric(df1: DataFrame, df2: DataFrame, df_mask: DataFrame, metric: Callable, min_n_rows: int = 10, type_cols: str = 'all', **kwargs) Series[source]¶
Compute a mean score based on missing patterns.
Note that for each pattern, a score is returned by the function metric. This code is based on https://www.statsmodels.org/
- Parameters
- df1pd.DataFrame
Dataframe representing the first empirical distribution, with nans
- df2pd.DataFrame
Dataframe representing the second empirical distribution
- df_maskpd.DataFrame
Elements of the dataframes to compute on
- metricCallable
metric function
- min_n_rowsint, optional
minimum number of row allowed for a pattern without nan, by default 10
- type_colsstr, optional
type of the columns (“all”, “numerical”, “categorical”)
- **kwargsdict
additional arguments
- Returns
- pd.Series
_description_