-
Notifications
You must be signed in to change notification settings - Fork 24
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
Make GaussianNormalizer
distribution names consistent with scipy
#722
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #722 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 1805 1808 +3
=========================================
+ Hits 1805 1808 +3
☔ View full report in Codecov by Sentry. |
rdt/transformers/numerical.py
Outdated
'gaussian': univariate.GaussianUnivariate, | ||
'student_t': univariate.StudentTUnivariate, | ||
'truncated_gaussian': univariate.TruncatedGaussian, |
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.
if in the init we replaced the deprecated distribution string with the new one before calling this method we could remove the deprecated mappings from this dictionary
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.
That's a good suggestion, thanks.
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.
Looks good, one more suggestion
@@ -311,6 +316,15 @@ def __init__(self, model_missing_values=None, learn_rounding_scheme=False, | |||
|
|||
self._distributions = self._get_distributions() | |||
if isinstance(distribution, str): | |||
if distribution in {'gaussian', 'student_t', 'truncated_gaussian'}: |
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.
if distribution in {'gaussian', 'student_t', 'truncated_gaussian'}: | |
if distribution in self._DEPRECATED_DISTRIBUTIONS_MAPPING: |
Resolve #656.