You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The problem is about the docstring of "LocalNormalizedCrossCorrelationLoss" under losses.
It is unclear if the returned value is in the range [-1, 1] as a standard correlation metric.
It is not clear if the returned value will be negative or positive, also it is not clear if it is subject to minimization or maximization.
Let me elaborate on an example:
If for any project I want to increase the correlation between two images, I would calculate the correlation first then I would
negate it since the autograd library I would use would do minimization by default. Then I would also add +1 to it since
having negative loss terms when doing minimization is generally frowned upon, I am not sure for a good reason or not.
But this loss function directly returns a negative value, without going into the code it is not clear if this is because
the correlation is actually negative or not, should minimize or maximize the value, these are not at all clear and
absolutely can't be assumed, so this information should clearly be stated in the docstring, possibly with an additional
explanation like "smaller loss means high correlation" or as such.
Describe the solution you'd like
In the docstring, state the range of the values that can be returned by the function if there is such a closed range.
State the "real calculation" to "loss function" conversion steps, what is the actual correlation value, and what are you applying to it before returning (applying log, multiplying with -1, etc.). So that people can interpret what a high or low loss value actually means in terms of correlation.
Optionally also state what a low or high loss value indicates in terms of correlation between the images for ease of usage.
Describe alternatives you've considered
I think there are endless ways of doing it, the main goal is clearing out any ambiguity, in whichever way possible. What I suggest seems reasonable to me.
Additional context
None
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The problem is about the docstring of "LocalNormalizedCrossCorrelationLoss" under losses.
Let me elaborate on an example:
If for any project I want to increase the correlation between two images, I would calculate the correlation first then I would
negate it since the autograd library I would use would do minimization by default. Then I would also add +1 to it since
having negative loss terms when doing minimization is generally frowned upon, I am not sure for a good reason or not.
But this loss function directly returns a negative value, without going into the code it is not clear if this is because
the correlation is actually negative or not, should minimize or maximize the value, these are not at all clear and
absolutely can't be assumed, so this information should clearly be stated in the docstring, possibly with an additional
explanation like "smaller loss means high correlation" or as such.
Describe the solution you'd like
Describe alternatives you've considered
I think there are endless ways of doing it, the main goal is clearing out any ambiguity, in whichever way possible. What I suggest seems reasonable to me.
Additional context
None
The text was updated successfully, but these errors were encountered: