sdv-dev / SDMetrics

Metrics to evaluate quality and efficacy of synthetic datasets.
https://docs.sdv.dev/sdmetrics
MIT License
210 stars 45 forks source link

KeyUniqueness metric should only be applied to primary and alternate keys #503

Closed frances-h closed 11 months ago

frances-h commented 12 months ago

Environment Details

Please indicate the following details about the environment in which you found the bug:

Error Description

In the DataValidity property, the KeyUniqueness metric is currently being applied to foreign key columns. The KeyUniqueness metric should only be applied to primary keys and alternate keys.

Steps to reproduce

from sdmetrics.demos import load_demo
from sdmetrics.reports.multi_table import DiagnosticReport

real_data, synthetic_data, metadata = load_demo(modality='multi_table')
report = DiagnosticReport()

report.generate(real_data, synthetic_data, metadata)
report.get_details('Data Validity')