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

Add quantile binning for uncertainty estimation including error bound estimation and evaluation metrics #281

Merged
merged 110 commits into from
Jul 21, 2023

Conversation

Schobs
Copy link
Member

@Schobs Schobs commented Dec 17, 2021

Implementation of uncertainty estimation for landmark localisation.

Description

Integrates Uncertainty estimation methods including: quantile binning, error bound estimation and evaluation metrics. Provides an example file.

Status

Work in progress

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • In-line docstrings updated.
  • Source for documentation at docs manually updated for new API.

@Schobs Schobs added the new feature New feature/module (including request) label Dec 17, 2021
@Schobs Schobs self-assigned this Dec 17, 2021
@Schobs Schobs added this to In progress in v0.1.0 via automation Dec 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

Merging #281 (e502f1c) into main (f3000a0) will decrease coverage by 1.22%.
The diff coverage is 84.84%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
- Coverage   92.08%   90.86%   -1.22%     
==========================================
  Files          55       63       +8     
  Lines        5635     6766    +1131     
==========================================
+ Hits         5189     6148     +959     
- Misses        446      618     +172     
Impacted Files Coverage Δ
kale/embed/factorization.py 88.30% <ø> (ø)
kale/utils/download.py 100.00% <ø> (ø)
kale/utils/logger.py 100.00% <ø> (ø)
kale/evaluate/similarity_metrics.py 30.76% <30.76%> (ø)
kale/interpret/uncertainty_quantiles.py 78.18% <78.18%> (ø)
kale/evaluate/uncertainty_metrics.py 96.43% <96.43%> (ø)
kale/embed/uncertainty_fitting.py 98.14% <98.14%> (ø)
kale/loaddata/tabular_access.py 100.00% <100.00%> (ø)
kale/predict/uncertainty_binning.py 100.00% <100.00%> (ø)
kale/prepdata/string_transform.py 100.00% <100.00%> (ø)
... and 2 more

... and 2 files with indirect coverage changes

Copy link
Member

@haipinglu haipinglu left a comment

Choose a reason for hiding this comment

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

You requested my review but the PR is marked as a draft and work in progress so that is a bit confusing. Please refer to other examples and the video https://www.youtube.com/watch?v=I3vifU2rcc0 for standards adopted. Also fix the error reported and missing tests. Then when ready, mark the PR ready for review and request a review from me. Thanks.

@haipinglu
Copy link
Member

@Schobs Did you request my review because the template says so? If yes, I should update the template with ifs.

@Schobs
Copy link
Member Author

Schobs commented Dec 21, 2021

@haipinglu Correct. I followed the template.

@haipinglu
Copy link
Member

haipinglu commented Dec 22, 2021

@haipinglu Correct. I followed the template.

Thanks. I will update the PR template with clearer guidance.

@haipinglu
Copy link
Member

@Schobs After checking the details (timeout error), I just rerun your latest PR checks and it passed. Congrats on your first green check in this PR.

num_bins: int,
show_sample_info: str = "None",
save_path: Optional[str] = None,
y_lim: int = 120,
Copy link
Member

@haipinglu haipinglu Jul 18, 2023

Choose a reason for hiding this comment

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

hard code? Check and log if no time.

Copy link
Member Author

Choose a reason for hiding this comment

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

i have added to discussion

r"$\bf{PSB}$" + ": \n" + r"${} \pm$".format(perc_info[0]) + "\n" + r"${}$".format(perc_info[1]),
verticalalignment="bottom", # Centered bottom with line
horizontalalignment="center", # Centered with horizontal line
fontsize=25,
Copy link
Member

Choose a reason for hiding this comment

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

Hard coded. Check what other libraries do with this. If not time to fix it, log it in the discussion.

Copy link
Member Author

Choose a reason for hiding this comment

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

added to discussion

Copy link
Member

@haipinglu haipinglu left a comment

Choose a reason for hiding this comment

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

Much improved, with some changes needed before merging. Talk in person if unclear. Many thanks.

@haipinglu
Copy link
Member

haipinglu commented Jul 18, 2023 via email

@haipinglu
Copy link
Member

haipinglu commented Jul 18, 2023 via email

@haipinglu
Copy link
Member

haipinglu commented Jul 20, 2023

@shuo-zhou Please help resolve the conflict below so that this branch can be updated, which should be straightforward. Thanks.

@haipinglu
Copy link
Member

@Schobs Put the missing test / test problem in discussion list.

Copy link
Member

@haipinglu haipinglu left a comment

Choose a reason for hiding this comment

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

Most imminent issues have been resolved for merging, with the remaining issues captured in #392 to follow up @alanbijuthomas .

Thank you for contributing such an important tool to PyKale.

@haipinglu haipinglu changed the title Landmark uncertainty Add quantile binning for uncertainty estimation including error bound estimation and evaluation metrics Jul 21, 2023
@haipinglu haipinglu merged commit 7c7162b into main Jul 21, 2023
8 checks passed
@haipinglu haipinglu deleted the landmark_uncertainty branch July 21, 2023 06:56
@haipinglu haipinglu mentioned this pull request Oct 6, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature/module (including request)
Projects
Status: Done
v0.2.0
In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants