ENH add dtype preservation to FactorAnalysis#24321
Open
svenstehle wants to merge 11 commits intoscikit-learn:mainfrom
Open
ENH add dtype preservation to FactorAnalysis#24321svenstehle wants to merge 11 commits intoscikit-learn:mainfrom
svenstehle wants to merge 11 commits intoscikit-learn:mainfrom
Conversation
glemaitre
reviewed
Dec 29, 2022
Member
glemaitre
left a comment
There was a problem hiding this comment.
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
SMALLvalue that was hard coded and actually too small for 32 bits. So I usedepsinstead depending of the input type.
Member
|
We can now check if the tests are passing on all platforms. |
glemaitre
approved these changes
Dec 29, 2022
Member
|
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. |
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
In scope of #11000
Continuing work of @thibsej already started in #13303
What does this implement/fix? Explain your changes.
Added
dtypepreservation toFactorAnalysisAny 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?