You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PCA random_state documentation doesn't cover all options #17291
On PCA documentation page https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html under random_state it says 'Used when svd_solver == ‘arpack’ or ‘randomized’.'. Strictly speaking it is actually sometimes also used when svd_solver == 'auto' (according to the rules laid out in svd_solver parameter description under 'If auto'). So, reading the documentation for the random_state parameter, it can appear that it is not necessary to set the random_state if svd_solver is set to 'auto' (as this case when under svd_solver'== auto' it uses the randomized method is not mentioned there).
Suggest a potential alternative/fix
Under the 'random_state' parameter description, change 'Used when svd_solver == ‘arpack’ or ‘randomized’.'. to 'Used when svd_solver == ‘arpack’ or ‘randomized’, and (if certain conditions are met) when svd_solver == 'auto' (see svd_solver parameter description).'.
Happy to submit a pull request with the change if you think it makes things clearer.
Activity
NicolasHug commentedon May 20, 2020
I agree that the curent
Used when svd_solver == ‘arpack’ or ‘randomized’is wrong.I feel like it could just be
It's up to the users to read what 'auto' selects.
crispinlogan commentedon May 20, 2020
Sure, I also agree with that.
Shall I open a PR and make the change as you suggest?
NicolasHug commentedon May 20, 2020
that'd be great, thanks!