Skip to content
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

expose intermediate outputs in map calculation #36

Open
johnarevalo opened this issue Jun 7, 2023 · 6 comments
Open

expose intermediate outputs in map calculation #36

johnarevalo opened this issue Jun 7, 2023 · 6 comments

Comments

@johnarevalo
Copy link
Member

By disaggregating the run_pipeline function in a modular way

@shntnu
Copy link
Member

shntnu commented Nov 6, 2023

@johnarevalo Does this issue also include the following feature?

I want to be able to know the number of positive and negative examples per row (which in turn is used to calculate the null)

@johnarevalo
Copy link
Member Author

Yes. I think the values you are looking for are in null_confs variable inside run_pipeline:

ap_scores, null_confs = compute.compute_ap_contiguos(rel_k_list, counts)

As quick workaround, you can copy the run_pipeline code in a separate script to inspect all the intermediate outputs.

@shntnu
Copy link
Member

shntnu commented Nov 6, 2023

As quick workaround, you can copy the run_pipeline code in a separate script to inspect all the intermediate outputs.

Thanks!

For our notes, here's what I did: https://github.com/broadinstitute/neuronal-cell-painting/blob/81bef05320e93c33f18f5587863845be63593697/ncp/src/my_run_pipeline.py

@shntnu
Copy link
Member

shntnu commented Nov 6, 2023

Update: I figured there's no downside to doing this:

https://github.com/broadinstitute/neuronal-cell-painting/blob/2486dfa6402154192d4dd127bb000bc1f9755f7a/ncp/src/my_run_pipeline.py#L65-L68

@johnarevalo
Copy link
Member Author

@shntnu , I forgot to mention null_confs is a list of [num_positive, total], not [num_positive, num_negative].

PD: I just merged a typo Alan fixed. now it is compute_ap_contiguous.

@johnarevalo
Copy link
Member Author

n_pos_pairs and n_total_pairs are now available in v0.3.1.

copairs/src/copairs/map.py

Lines 159 to 160 in 11570eb

meta["n_pos_pairs"] = null_confs[:, 0]
meta["n_total_pairs"] = null_confs[:, 1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants