-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Disabled perturbation on date #1932
Conversation
giskard/push/perturbation.py
Outdated
@@ -121,7 +121,7 @@ def _apply_perturbation( | |||
ds_slice_copy = ds_slice.copy() | |||
|
|||
# Apply the transformation | |||
if col_type == SupportedPerturbationType.NUMERIC: | |||
if col_type == SupportedPerturbationType.NUMERIC and ds.df.dtypes[feature] in ["int64", "float64"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about int32
, float32
, etc.?
I think this https://pandas.pydata.org/docs/reference/api/pandas.api.types.is_datetime64_any_dtype.html would be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up using https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.api.types.is_any_real_numeric_dtype.html which is more robust.
As it will exclude all non-real numeric data type so we don't end up with the same issue with another pseudo-numeric data type.
…e' into bug/disabled_perturbation_on_date
|
Description
Disabled perturbation on date
Related Issue
Type of Change