-
Notifications
You must be signed in to change notification settings - Fork 7
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
init mp calculate 1 #66
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alexanderlacuna I've added some comments for you to work on-- shouldn't be alot of work; and then I'll have this merged ASAIC.
def compute_correlation_2(corr_inputs): | ||
|
||
(this_trait_samples, target_trait) = corr_inputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: pass in samples
and target_traits
as params; instead of a single set. The resulting function should look like:
def compute_correlation_2(corr_inputs): | |
(this_trait_samples, target_trait) = corr_inputs | |
def compute_correlation_2(samples, target_trait): |
(corr_coeff, p_val) = scipy.stats.pearsonr( | ||
x_vals[~nans_values], y_vals[~nans_values]) | ||
|
||
# print(corr_coeff, p_val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Remove this dead comment.
credit:https://github.com/bukson/nancorrmp | ||
|
||
""" | ||
this_trait_samples = this_trait["trait_sample_data"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: You should really work on how you name your variables. Stop inheriting this naming scheme from gn2. Try to use variables that are easy to understand when scheming code.
implementation Parallel correlation calculation of big numpy arrays or pandas dataframes with NaNs and infs
for gn3
Credit:https://github.com/bukson/nancorrmp