-
Notifications
You must be signed in to change notification settings - Fork 32
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
Modify normalize.py for easier usage of whitening method #96
Comments
Thanks for opening this issue @AdeboyeML - I am looking forward to your contributions!
I like this approach in principle, but we should also do one other thing to avoid a potentially disastrous scenario. Disastrous scenarioImagine that a user copy and pasted code from one repo to another. In the first repo, the original code was: normalize(
profiles=anno_df,
samples="all",
method="whiten",
whiten_method="ZCA"
) However, the user wanted to switch from whitening to standardizing. If the user switched only this: normalize(
profiles=anno_df,
samples="all",
method="standardize",
whiten_method="ZCA"
) Then the code would default to W would want the internal Alternative approachOne alternative approach could be to set In this case, we need to make it clear in the |
Yes, the alternative approach is more elegant, we should give the user the preference to always set |
Let's go with |
see broadinstitute/lincs-cell-painting#38 (comment) for the decision. We'll close this issue once we make the software fix and it passes old (and potentially new) tests. @AdeboyeML - do you want to make this fix? |
Yes, I will make the fix. |
I have changed the whiten_method default to "ZCA-cor" and I also ran the test_normalize.py on my local machine and it passed the test. |
Thanks for opening the PR in #97 @AdeboyeML ! The best kind of PRs are the ones that make minimal changes. I didn't realize that we basically already have the alternate scenario as described above #96 (comment) I think we should go ahead and merge #97 (I will do this) but we should still keep this issue open. We should keep it open because my alternative solution isn't really that satisfying... there must be some happy medium between the current method (still error prone) and the suggestion you list above:
Can you think of a better way? Maybe splitting out whitening from |
Yes, maybe we could split out whitening from normalize.py and create a new function called |
sounds good - let's put this "on the shelf" for now. Edit: idiom 2 in the updated link |
whiten_method = ZCA/PCA/PCA-cor/ZCA-cor
without the need to statemethod = whiten
suggested approach:
whiten_method
will be by defaultNone,
once a whiten_method is given by the user and is one of the methods we have in whiten method list, automatically method is set to 'whiten'.The text was updated successfully, but these errors were encountered: