aws / aws/sagemaker-scikit-learn-extension
QuantileExtremeValuesTransformer modifies original input
- Dominant language
- Python
- Stars
- 41
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
The QuantileExtremeValuesTransformer modifies the original input after calling fit_transform or transform. This seems to be a bug given that the base QuantileTransformer in sklearn doesn't do this nor does any other sklearn op. At the very least RobustStandardScaler, ThresholdOneHotEncoder in this repo also doesn't modify the original input as well so there are some inconsistencies there.
You can reproduce by just using a snippet from the test script:
```
data = np.array(
[
[0.0, 0.0, 0.0],
[-1.0, 1.0, 1.0],
[-2.0, 2.0, 2.0],
[-3.0, 3.0, 3.0],
[-4.0, 4.0, 4.0],
[-5.0, 5.0, 5.0],
[-6.0, 6.0, 6.0],
[-7.0, 7.0, 7.0],
[-8.0, 8.0, 8.0],
[-9.0, 9.0, 9.0],
[-10.0, 10.0, 10.0],
[-1e5, 1e6, 11.0],
]
)
qt = QuantileExtremeValuesTransformer(threshold_std=2.0)
qt.fit_transform(data)
```
Data will be modified as the fitted and transformed data.
Contributor guide
Research direction
Locate the QuantileExtremeValuesTransformer implementation and begin by running the reproduction snippet from the issue. Compare the input array before and after fit_transform and transform; done means those operations leave the original input unchanged while preserving their transformed results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100