-
Notifications
You must be signed in to change notification settings - Fork 21
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
About the eq.4 #3
Comments
Dear redsadaf, Thank you for your interests! The eq.4 in the paper is defined for multi-label segmentation. So you can apply the equation for not only binary segmentation but multi-class segmentation problems. Please note that if the eq.4 will provide a K by K matrix if there are K categories in your dataset. (I copy and paste the reply in #1 ). |
@ykwon0407 Thank you for the reply. I am posting here my reply to follow the thread properly. A couple of clarification questions:
|
@mongoose54 Hi~ Here is the point-by-point response.
|
@ykwon0407 Thanks again for the wonderful explanation. |
@mongoose54 Hello! :)
|
Sorry, why does Eq. 4 provide a K*K matrix when there are K classes? |
Besides, p_hat is just a list of 10 probabilities of some certain class (according to line 63 in /retina/utils.py), why does it have diagonal matrix? |
@ShellingFord221 Hi~~ Here is the point-by-point response. Sorry, why does Eq. 4 provide a K*K matrix when there are K classes? Besides, p_hat is just a list of 10 probabilities of some certain class (according to line 63 in /retina/utils.py), why does it have diagonal matrix? |
The diagonal matrix is mentioned in Eq. 4 in you paper, diag(p_hat) |
emmm... p_hat shoud be a matrix of size (num_samples, num_classes) (i.e. (10, 3) in my settings)? |
The diagonal matrix is mentioned in Eq. 4 in you paper, diag(p_hat) emmm... p_hat shoud be a matrix of size (num_samples, num_classes) (i.e. (10, 3) in my settings)? Let me clear all the details in the following In /retina/utils.py
Then the aleatoric and epistemic matrix will be as follows.
Hope this information helps you! |
Thank you so much!!! But there's still a little question. In Eq. 4 of your paper, the diag is about p_hat, but in your codes above, it seems that diag is about prediction (the mean of p_hat). |
And why should the dot product of the matrix be divided by shape[0]? (p_hat.T.dot(p_hat)/prediction.shape[0]) |
@ShellingFord221 You're welcome! :) And why should the dot product of the matrix be divided by shape[0]? (p_hat.T.dot(p_hat)/prediction.shape[0]) |
Thanks again for your kindly reply! But prediction.shape[0] should be the number of classes, not the number of samples. |
@ShellingFord221 You are right! My bad. |
The sum of diagonal elements in the aleatoric uncertainty matrix is meaningful, is the sum of diagonal elements in the epistemic uncertainty matrix meaningful, too? |
The sum of diagonal elements in the aleatoric uncertainty matrix is meaningful, is the sum of diagonal elements in the epistemic uncertainty matrix meaningful, too? Besides, does the aleatoric uncertainty mean the uncertainty about the test data, and epistemic uncertainty mean the uncertainty about the model? |
The claim that aleatoric uncertainty means the uncertainty about the test data and epistemic uncertainty means the uncertainty about the model is also from this paper, Bayesian Convolutional Neural Networks with Variational Inference (the paragraph above section 6 experiments). But I have read his code, he mistakes the calculation of uncertainty about binary classification and multi-label classification, therefore his result about these two uncertainty is a number, rather than a K*K matrix (Table 2 in his paper). |
Besides, if I want to calculate the whole uncertainty (i.e. the sum of two uncertainties), should I:
|
@ShellingFord221 Either way is fine! |
Hi, after a half of year, it seems that I am confused again about the code above o(╥﹏╥)o . |
@ShellingFord221 Hi, again!. The dot product operations will sum over elements. Please see this link together https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html. |
Could you please let me know whether the eq. 4 in the paper is applicable for multi label segmentation or just the binary segmentation?
Originally posted by @redsadaf in #1 (comment)
The text was updated successfully, but these errors were encountered: