Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TVComplement metric #142

Closed
katxiao opened this issue Jun 28, 2022 · 0 comments · Fixed by #157
Closed

Add TVComplement metric #142

katxiao opened this issue Jun 28, 2022 · 0 comments · Fixed by #157
Assignees
Milestone

Comments

@katxiao
Copy link
Contributor

katxiao commented Jun 28, 2022

Problem Description

Add a TVComplement metric. For each discrete column: Calculate the frequencies of each category in the real data (r0, r1, …), expressed as a proportion in [0, 1]; also calculate frequencies in synthetic data (s0, s1, …). Calculate the Total Variation Distance between the two distributions and then normalize it.

image

The breakdown only contains the score.

Expected behavior

# single table case
>>> TVComplement.compute_breakdown(real, synthetic, metadata)
{
  'user_age': { 'score': 0.96667 },
  ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant