-
-
Notifications
You must be signed in to change notification settings - Fork 333
Add ArcSinhTransformer for inverse hyperbolic sine transformation #879
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
base: main
Are you sure you want to change the base?
Add ArcSinhTransformer for inverse hyperbolic sine transformation #879
Conversation
ankitlade12
commented
Jan 8, 2026
- Add ArcSinhTransformer class with loc and scale parameters
- Support for positive and negative values (unlike LogTransformer)
- Includes inverse_transform method
- Add comprehensive tests with pytest parametrize
- Add user guide documentation
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.
Hi @ankitlade12
This transformer is ready to go (almost ;) )
We need a few additions:
- please add the transformer in docs/index
- please add the transformer to docs/api
- please add to readme
- please add to https://github.com/feature-engine/feature_engine/blob/main/tests/test_transformation/test_check_estimator_transformers.py
- please rebase main onto this branch so that non-related tests pass
- did you check that the docs pass?
In the user-guide, maybe we can say a bit more about how this transformer compares to log and arcsin? so that the user understands when to use this and when to use the others?
It might help to actually have a demo comparing the 3 transformers, highlighting when this one works and the others don't and viceversa.
It would also be helpful to understand why we should scale the data with loc and scale, not just the effect it has on the values, but an intuitive explanation to someone that is less familiar with transformations and wants to understand if they should apply this to their data or not.
Could we add at the end of the user api file the links with more info suggested in the issue:
https://stats.stackexchange.com/questions/1444/how-should-i-transform-non-negative-data-including-zeros
And maybe also a link to the article:
https://www.jstor.org/stable/2288929
- Add ArcSinhTransformer class with loc and scale parameters - Support for positive and negative values (unlike LogTransformer) - Includes inverse_transform method - Add comprehensive tests with pytest parametrize - Add user guide documentation
…ide with comparison and references
4037b58 to
201b032
Compare