issues
search
sdv-dev
/
SDMetrics
Metrics to evaluate quality and efficacy of synthetic datasets.
https://docs.sdv.dev/sdmetrics
MIT License
201
stars
45
forks
source link
Update Referential Integrity metric to support NaNs in child column
#587
Closed
gsheni
closed
2 months ago
gsheni
commented
2 months ago
Problem Description
For the Referential Integrity metric, we currently do the following:
If the foreign key in the real data has any NaN values, those are dropped in the foreign key in the synthetic data.
We also verify that all foreign keys have valid parent.
To support NaNs values in foreign keys, we need to update this logic.
Expected behavior
Update
ReferentialIntegrity.compute_breakdown()
to do the following:
If the real data has NaN values, and the synthetic data has NaN values in the FK, then it is okay.
If the real data does not have NaN values, but the synthetic data has NaN values in the FK, this will result in a lower score.
The score can be lowered by the number of extra NaNs present in the synthetic data.
Update test_referential_interity.py
Update documentation
Additional context
Function to update:
https://github.com/sdv-dev/SDMetrics/blob/51f3ac2904c065462097c80f4387b973657ad6d9/sdmetrics/column_pairs/statistical/referential_integrity.py#L36
Problem Description
Expected behavior
ReferentialIntegrity.compute_breakdown()
to do the following:Additional context