Warn about random_state usage across NDM classes#37
Open
Luca-W-D wants to merge 4 commits intonoise-lab:masterfrom
Open
Warn about random_state usage across NDM classes#37Luca-W-D wants to merge 4 commits intonoise-lab:masterfrom
random_state usage across NDM classes#37Luca-W-D wants to merge 4 commits intonoise-lab:masterfrom
Conversation
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.
Many NDM models expose a
random_stateparameter, but its behavior varies because different models rely on different underlying libraries (scikit-learn,PyOD,PyTorch). As a result, some models produce deterministic output while others ignore the argument entirely. This is also confusing when users pass a model instance to create aMODELobject, which has its ownrandom_stateparameter with no effect.Changes included:
verbose > 5) when random_state is passed but the relevant class doesn't use the parameter.random_statefrom signatures where it is nonfunctional.I also made some arbitrary decisions to try and match the current repository:
verbose > 5as the threshold, mimicking the AutoEncoder threshold for debug output; however, other parts of the repo use different cutoffsverboseto PCA's function signature with a default value of 0. Other initializers default toverbose=Falseorverbose=1.Hopefully these updates make reproducibility expectations clearer without breaking anyone's existing projects.