MMMIDataWrapper.compare_coords#
- MMMIDataWrapper.compare_coords(mmm, variable='channel_data')[source]#
Find coordinate mismatches between idata and the model.
Compares the coordinate values for each custom dimension (i.e. not
"date") of the specified variable between this wrapper’s idata and the fitted PyMC model.- Parameters:
- mmm
MMM Fitted MMM model instance whose
modelattribute contains the PyMC model with coordinate metadata.- variable
str, default"channel_data" Name of the model variable whose dimensions are checked.
- mmm
- Returns:
tupleof (dict[str,set[str]],dict[str,set[str]])(in_model_not_idata, in_idata_not_model)where:in_model_not_idata: mapping from dimension name to the set of coordinate values present in the model but absent from the idata. When a dimension is entirely missing from the idata (e.g. dropped by a scalarfilter_dimscall), all of the model’s coordinates for that dimension are included.in_idata_not_model: mapping from dimension name to the set of coordinate values present in the idata but absent from the model (e.g. new labels introduced byaggregate_dims).
Only dimensions with at least one mismatched coordinate are included in each dict; empty dicts mean full compatibility.