[FIX] PCA: ensure tests pass on sklearn 1.4 and 1.5, which can return different results#6821
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6821 +/- ##
==========================================
- Coverage 88.26% 88.26% -0.01%
==========================================
Files 326 326
Lines 71156 71158 +2
==========================================
+ Hits 62805 62806 +1
- Misses 8351 8352 +1 |
|
@markotoplak As far as I can tell, none of the remaining failures have anything to do with #6815. This should be good to merge. |
|
For posterity's sake: PCA can produce different results between scikit-learn versions 1.4.0 and 1.5.0 in that the directions of the vectors may be flipped. While they do ensure a consistent output within each version of scikit-learn using their This change, which causes inconsitencies between scikit-learn 1.4.0 and 1.5.0 was not discussed in their PR, but it was apparently necessary to make the outputs of PCA consistent between the different solvers in 1.5.0 (original PR and comment here). |
Issue
#6815 broke a few things that went under the radar, primarily due to scikit-learn 1.5.0 changes.
Includes