Skip to content

Conversation

emersodb
Copy link
Collaborator

@emersodb emersodb commented Sep 17, 2025

PR Type

Feature

Short Description

Clickup Ticket(s): https://app.clickup.com/t/868fk3gbd

This PR adds a metric to the the quality and privacy metrics in the library respectively. These are Mean F1 Score Difference and Hitting Rate.

Two additional components have also trivially changed.

  • The first was to change the name of the base class associated with the SynthEval metrics to be more general (as it underpins both privacy and quality metrics now)
  • The second was to fix a bug in the preprocessing function that I had created when preprocessing with a holdout set 😢 . This is fixed and now properly tested within the metrics tests.

Tests Added

Tests have been added for both metrics. Hitting Rate is very thoroughly tested and Mean F1 Score Difference is run on a large set of data that requires training multiple models. I've sanity checked the results and they all make sense.

…ixing a preprocessing bug and changing the name of the syntheval metric base class.
@emersodb emersodb changed the base branch from main to dbe/add_hellinger_pmse September 17, 2025 17:01


class SynthEvalQualityMetric(MetricBase, ABC):
class SynthEvalMetric(MetricBase, ABC):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name change to be more general as it now underpins more than just quality metrics (Hitting Rate, with others to follow).

@emersodb emersodb marked this pull request as ready for review September 17, 2025 17:06
Copy link
Collaborator

@lotif lotif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes :)

A smaller rate is better.
NOTE: Categorical variables must be encoded in some way (ordinal or vector) for the evaluation to work. This
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we perhaps implement the compute function in a way that takes care of the encoding for categorical variables? With do_preprocess only attributed to the numerical ones perhaps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to allow a bit of flexibility in the way a user can process the datasets they are sending to this function, while also providing a "sensible" default (i.e. the one that SynthEval provides).

I don't want to force preprocessing on the user if they want to do it some other way. For example, perhaps imputation needs to be done or you are going to collapse under represented classes before encoding. So this was the route I thought might work best. Happy to discuss it a bit more though!

emersodb and others added 2 commits September 17, 2025 17:26
…ering.py (#8)

Moving the clustering code into its own clustering.py module and adding docstrings.

Also, moving some common parameter type definitions to a params.py module.
@emersodb emersodb requested a review from lotif September 17, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants