Skip to content

Adding quality metrics and opening discussion - #3912

Open
alexdesiqueira wants to merge 8 commits into
scikit-image:pre-megamove-integrationfrom
alexdesiqueira:quality_measures
Open

alexdesiqueira wants to merge 8 commits into
scikit-image:pre-megamove-integrationfrom
alexdesiqueira:quality_measures

Conversation

@alexdesiqueira

@alexdesiqueira alexdesiqueira commented May 16, 2019 •

Copy link
Copy Markdown
Member

Description

This brings us a basic implementation for several metrics: precision, recall, specificity, accuracy, and the coefficients of Matthews, Dice (F1 score), and informedness. Open to discussion (see first comment).

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • Consider backporting the PR with @meeseeksdev backport to v0.14.x

@pep8speaks

pep8speaks commented May 16, 2019 •

Copy link
Copy Markdown

Hello @alexdesiqueira! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 180:80: E501 line too long (111 > 79 characters)
Line 216:80: E501 line too long (81 > 79 characters)
Line 270:13: E226 missing whitespace around arithmetic operator
Line 270:25: E226 missing whitespace around arithmetic operator
Line 297:80: E501 line too long (89 > 79 characters)
Line 299:80: E501 line too long (80 > 79 characters)
Line 340:80: E501 line too long (81 > 79 characters)
Line 353:55: W504 line break after binary operator
Line 381:80: E501 line too long (80 > 79 characters)
Line 419:80: E501 line too long (80 > 79 characters)
Line 457:80: E501 line too long (80 > 79 characters)

Comment last updated at 2020-02-28 00:08:14 UTC

@alexdesiqueira

Copy link
Copy Markdown
Member Author

Hi @scikit-image/core,
I implemented these functions a while ago, and since we don't have them, I'd like to discuss their addition. For that, some questions:

  1. Do we need these metrics? I think scikit-learn has some of them. Please feel free to close the PR if they are not worth the effort.
    Is the PR still alive? OK, the other issues:
  2. They are scattered around one file. I think they maybe would be better implemented as one class instead, that could also return a confusion matrix. Thoughts?
  3. This implementation only works on binary images right now. I am not working on cases with labels, or fancier images; that would need more effort. sklearn has their confusion matrix as something like that, however (it works on several classes). Maybe it could be a start.
    After discussing this I'd work on documentation and all.
    Thank you for your time.

@alexdesiqueira

Copy link
Copy Markdown
Member Author
  1. This implementation only works on binary images right now. I am not working on cases with labels, or fancier images; that would need more effort. sklearn has their confusion matrix as something like that, however (it works on several classes). Maybe it could be a start.

On the other hand, some of these measures only work on binary images... silly me 😌

@stefanv

stefanv commented May 16, 2019

Copy link
Copy Markdown
Member

There seems to be a few segmentation/clustering comparison algorithms out there, including Normalized Probabilistic Rand: https://ieeexplore.ieee.org/abstract/document/1565332. I guess there are others too; we should try to find a review paper.

@alexdesiqueira

Copy link
Copy Markdown
Member Author

@stefanv I have one or two reviews I used during previous research; I'll paste their names and possible links soon.

@alexdesiqueira
alexdesiqueira requested a review from stefanv May 21, 2019 21:28
@stefanv

stefanv commented May 21, 2019 via email

Copy link
Copy Markdown
Member

@alexdesiqueira

Copy link
Copy Markdown
Member Author

I missed it 🤦‍♂️ I saw only confusion_matrix before. I believe they all are usable for our images, and I think they're prepared to deal with more than two classes.

@stefanv

stefanv commented May 22, 2019 via email

Copy link
Copy Markdown
Member

@alexdesiqueira

Copy link
Copy Markdown
Member Author

Closed due to overlapping with scikit-learn functions. Please reopen if necessary.

@jni

jni commented May 28, 2019

Copy link
Copy Markdown
Member

I think I'd like this reopened. I'd also appreciate reviews on #3354!

@alexdesiqueira

Copy link
Copy Markdown
Member Author

@jni any opinions on this one?

@rbavery rbavery mentioned this pull request Jul 14, 2019
2 of 10 tasks
@alexdesiqueira

Copy link
Copy Markdown
Member Author

Reopening this; @jni, would you like to discuss that?

Base automatically changed from master to main February 18, 2021 18:23
@matthew-brett
matthew-brett changed the base branch from main to pre-megamove-integration June 19, 2026 15:19
@matthew-brett

Copy link
Copy Markdown
Contributor

We have changed the base branch for this PR from the main branch to the pre-megamove-integration branch.

Summary - what this means for your PR

You can continue to work on your PR, now based on pre-megamove-integration. You should update your branch to the current state of pre-megamove-integration (this is what the Github "Update branch" button does). Please do not merge the scikit-image main branch into your PR branch.

Once we've merged your PR into the pre-megamove-integration branch, we'll update your changes for Megamove, and merge into the main branch.

In addition - our automated script detected that your branch had merge conflicts with the pre-Megamove branch. Please make sure to merge in the pre-megamove-integration branch, and resolve the merge conflicts in the way that you want.

Read on for the Megamove rationale, and more detailed instructions.

Details

Rationale

We've changed the base branch to make it easier and smoother to continue to work on your PR, while we work through a rather large change in the directory structure of the repository - a change that we have called Megamove.

See the Megamove explanation issue for more detail.

Changing the base branch means you do not see merge conflicts related to the Megamove change, and can continue to work with the repository in its original state, without worrying about porting those changes across to the new post-Megamove structure.

As you'll see in the linked issue, you can continue to work on your PR as before, and you can continue to use the Github GUI to "Update branch" - this updates from the new pre-megamove-integration branch. However, there is one caveat: please, do not try and merge the scikit-image main branch into this one, but instead, keep track of the pre-megamove-integration branch. The issue explains more.

To emphasize again, do not try and merge the scikit-image main branch. You will get Megamove related merge conflicts that are rather tricky to resolve correctly.

When we've approved your PR, we'll merge into the pre-megamove-integration branch, and then process it so we can merge it into the main branch. We'll let you know when we've merged your PR changes into main.

Any questions, please reply here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants