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

User validation for reverse_transform #480

Closed
npatki opened this issue Apr 6, 2022 · 0 comments
Closed

User validation for reverse_transform #480

npatki opened this issue Apr 6, 2022 · 0 comments
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Apr 6, 2022

Problem Description

When a user uses reverse_transform, we should validate their input & throw appropriate warnings/errors.

Expected behavior

Perform the following 3 validation checks:

1. Reverse transforming data before fitting it

Note: This also applies if the HyperTransformer was previously fit but the config has changed since then.

ht = HyperTransformer()
ht.detect_initial_config(data)
ht.reverse_transform(reversed_data)
Error: The HyperTransformer is not ready to use. Please fit your data first using 'fit' or 'fit_transform'.

2. Transforming the data before setting a config

ht = HyperTransformer()
ht.reverse_transform(reversed_data)
Error: No config detected. Set the config using 'set_config' or pre-populate it automatically from your data using 'detect_initial_config' prior to fitting your data.

3. The data does not have the exact same column names as the config (& fit data)

ht = HyperTransformer()
ht.detect_initial_config(data)
ht.fit(data)
ht.reverse_transform(bad_data)
Error: There are unexpected columns in the data you are trying to transform. You must provide a transformed dataset with all the columns from the original data.
@npatki npatki added the feature request Request for a new feature label Apr 6, 2022
@amontanez24 amontanez24 self-assigned this Apr 25, 2022
@amontanez24 amontanez24 added this to the 1.0.0 milestone Apr 25, 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