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

Feature/negative predictive value #759

Merged
merged 21 commits into from
Nov 27, 2024

Conversation

arshiaar
Copy link
Contributor

Issues

Implements issue #750

Docstrings

  • [x ] Docstrings complete and follow Napoleon (google) style
  • [ x] Maths equation added
  • [ x] Reference to paper/webpage is in docstring. The preferred referencing style for journal articles is APA (7th edition)

Documentation

@Steph-Chong
Copy link
Collaborator

Steph-Chong commented Nov 25, 2024

I haven't looked at your code as yet, but I wanted to provide some extra information.

Negative predictive value will also need to be added to the binary categorical score tutorial - specifically, the tutorial includes a list of binary categorical scores included in scores. "negative predictive value" should be added to this list.

[Screenshot below is taken from https://scores.readthedocs.io/en/stable/tutorials/Binary_Contingency_Scores.html]

image

Also, I have also just realised that the "success ratio (precision)" entry will also need to be updated to "success ratio (precision, positive predictive value)" - sorry I didn't think of that before.

@arshiaar
Copy link
Contributor Author

name: Arshia Sharma :)

@Steph-Chong
Copy link
Collaborator

Steph-Chong commented Nov 25, 2024

name: Arshia Sharma :)

Thanks Arshia. When I next update the release notes I will include you as "Arshia Sharma (@arshiaar)".

Copy link
Collaborator

@Steph-Chong Steph-Chong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pull request @arshiaar.

I have some very minor feedback on included.md and the docstring.

I don't have the domain expertise to review the functional code and the tests, so I will leave the review of those to others.

src/scores/categorical/contingency_impl.py Outdated Show resolved Hide resolved
docs/included.md Outdated Show resolved Hide resolved
@tennlee tennlee linked an issue Nov 25, 2024 that may be closed by this pull request
@tennlee tennlee requested review from nicholasloveday and removed request for nicholasloveday November 25, 2024 11:15
@tennlee
Copy link
Collaborator

tennlee commented Nov 25, 2024

@nicholasloveday FYI, I will re-add you once I've had a chance to review tomorrow, I need to check some things. Feel free to take a look, but also feel free to wait until I've had a look.

arshiaar and others added 2 commits November 26, 2024 09:56
Co-authored-by: Stephanie Chong <[email protected]>
Signed-off-by: arshia <[email protected]>
Co-authored-by: Stephanie Chong <[email protected]>
Signed-off-by: arshia <[email protected]>
@tennlee
Copy link
Collaborator

tennlee commented Nov 25, 2024

@nicholasloveday okay, feel free to review this now. Sorry! :)

@arshiaar arshiaar force-pushed the feature/negative_predictive_value branch from 9b79ba7 to 74790a7 Compare November 26, 2024 03:12
@nicholasloveday
Copy link
Collaborator

Thanks for this update @arshiaar . The equation and tests look correct to me.

@tennlee
Copy link
Collaborator

tennlee commented Nov 26, 2024

In addition to the wikipedia link, can you please add this article/citation to the references: https://www.mdpi.com/1648-9144/57/5/503 . I'll wonder if it would actually be worth adding this to each of: PPV, NPV, sensitivity and specificity. The citation to use is:

Monaghan, T. F., Rahman, S. N., Agudelo, C. W., Wein, A. J., Lazar, J. M., Everaert, K., & Dmochowski, R. R. (2021). Foundational Statistical Principles in Medical Research: Sensitivity, Specificity, Positive Predictive Value, and Negative Predictive Value. Medicina, 57(5), 503. https://doi.org/10.3390/medicina57050503

For the other scores that NPV, I would suggest opening a new PR to address those, so that this score can be added sooner than later.

@tennlee
Copy link
Collaborator

tennlee commented Nov 27, 2024

I will merge this PR as-is, then add the additional reference afterwards.

@tennlee tennlee merged commit 11d0575 into nci:develop Nov 27, 2024
17 checks passed
@tennlee
Copy link
Collaborator

tennlee commented Nov 27, 2024

Thanks so much for all of this work! :). I have merged this, and also added the Monaghan et al. (2021) reference in to the relevant spots (NPV, PPV, specificity, sensitivity).

Here is a link to negative predictive value in the 'latest' (development) build of the docs: https://scores.readthedocs.io/en/latest/api.html#scores.categorical.BasicContingencyManager.negative_predictive_value

tennlee pushed a commit that referenced this pull request Dec 7, 2024
* feat: add ppv function and update alias docstrings
* update included.md


Co-authored-by: Stephanie Chong <[email protected]>
Signed-off-by: arshia <[email protected]>

* Update docs/included.md

Co-authored-by: Stephanie Chong <[email protected]>
Signed-off-by: arshia <[email protected]>

---------

Signed-off-by: arshia <[email protected]>
Co-authored-by: Arshia Sharma <[email protected]>
Co-authored-by: Stephanie Chong <[email protected]>
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

Successfully merging this pull request may close these issues.

Consider adding "Negative Predictive Value"
4 participants