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 transformer methods to PARSynthesizer #1082

Closed
amontanez24 opened this issue Oct 21, 2022 · 0 comments
Closed

Add transformer methods to PARSynthesizer #1082

amontanez24 opened this issue Oct 21, 2022 · 0 comments
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@amontanez24
Copy link
Contributor

Problem Description

As a user, it would be useful to be able to update, learn or view transformers for my sequential data.

Acceptance criteria

Add the following methods to the PARSynthesizer

  • auto_assign_transformers(data)
    • data is a pandas.DataFrame
    • By default, this method shouldn't assign any transformers.
  • get_transformers()
    • This should return the transformers for every column in the data.
  • update_transformers(column_name_to_transformer)
    • column_name_to_transformer is a dict mapping column names to transformer instances
    • If the user tries to update the transformer for a context column, we should raise an error

Expected behavior

>>> synthesizer.assign_transformers(data)

>>> synthesizer.get_transformers(table_name='users')
{
  'patient_id': None
  'ssn': None,
  'time': None
  ...
}

>>> from rdt.transformers as rt

>>> paf = rt.PeudoAnonymizedFaker(provider_name='address', function_name='address')
>>> pn = rt.AnonymizedGeoExtractor()
>>> pn2 = rt.AnonymizedGeoExtractor()

>>> model.update_transformers(
  column_name_to_transformer={
    'patient_id': rt.RegexGenerator(regex_format='[0-9]{4}'),
})

Error: Transformers for context columns are not allowed to be updated.

Additional context

  • We should not return or allow the modification of any of the transformers in the context synthesizer. For now, that will be hidden from the user.
@amontanez24 amontanez24 added the feature request Request for a new feature label Oct 21, 2022
@amontanez24 amontanez24 added this to the 1.0.0 milestone Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants