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
ENH add dtype preservation to FactorAnalysis #24321
base: main
Are you sure you want to change the base?
ENH add dtype preservation to FactorAnalysis #24321
Conversation
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.
It was quite complex to make a review. Instead, I pushed the changes directly into the branch. So what changed is the following:
- improve the test to check the dtype of the fitted attribute and public function
- check the equivalence of the transform function between 32 and 64 bits
The latter point is difficult. Doing it I saw 2 other things to change:
- a bug where the stopping criterion was not the absolute value
- a
SMALL
value that was hard coded and actually too small for 32 bits. So I usedeps
instead depending of the input type.
We can now check if the tests are passing on all platforms. |
This PR in its current state assumes the 2nd option. I could live with that, but I'd like the opinion of other devs before merging. |
Reference Issues/PRs
In scope of #11000
Continuing work of @thibsej already started in #13303
What does this implement/fix? Explain your changes.
Added
dtype
preservation toFactorAnalysis
Any other comments?
The test passes, but did we also check the numerical stability? PR #13303 added a test for this,
is this obsolete with our newcheck_transformer_preserve_dtypes
?