Skip to content

Conversation

@kevinmessiaen
Copy link
Member

Description

Disabled perturbation on date

Related Issue

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix


# Apply the transformation
if col_type == SupportedPerturbationType.NUMERIC:
if col_type == SupportedPerturbationType.NUMERIC and ds.df.dtypes[feature] in ["int64", "float64"]:
Copy link
Contributor

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

Copy link
Member Author

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.

@rabah-khalek rabah-khalek enabled auto-merge (squash) May 17, 2024 11:28
@sonarqubecloud
Copy link

@rabah-khalek rabah-khalek merged commit f1c1a8f into main May 17, 2024
@rabah-khalek rabah-khalek deleted the bug/disabled_perturbation_on_date branch May 17, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants