Reduce misleading of cluster edges #1973
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR overhauls the edge still of the cluster graph, to make them misleading (for example, that an edge with a similarity of 90% can have the minimal thickness and opacity)
The edge thickness is now clamped between 0 and 100 percent instead of the min and max
The edge opacity is now mapped between the max and the smaller value of 50% or the min
More detailed math
Lets call the highest similarity of any comparison in the cluster$sim_{max}$ and the lowest $sim_{min}$ .$sim$ .
$thickness = \frac{sim - 0}{1 - 0} * 5 + 1 = sim * 5 + 1$
$opacity = \frac{sim - min(sim_{min}, 0.5)}{sim_{max} - min({sim_{min}}, 0.5)} * 0.7 +0.3$
Lets take a comparison with similarity
Its thickness will be equal to:
Opacity is calculated like this:
Comparison 1
Comparison 2
Comparison 3
Left old, right new