Adding functionality to choose closest matching threshold. - #2405
Adding functionality to choose closest matching threshold.#2405mo-jbeaver wants to merge 5 commits into
Conversation
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-jbeaver I think that this PR makes a useful improvement to the robustness of the decision tree application plugin. I've left you a few minor comments.
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-jbeaver I've added another couple of minor comments.
brhooper
left a comment
There was a problem hiding this comment.
Thanks for making changes and explaining my misunderstandings to me @mo-jbeaver . Happy to approve.
|
@mo-jbeaver It has just occurred to me that we should add a unit test covering the case that at least 2 thresholds are identified which are equidistant from the desired threshold value. What happens in this instance? Do we need to add specific handling of this? |
@brhooper I ran some tests, and it seems that when there are multiple equidistant points then, it selects the threshold which is listed first when the thresholds are listed in the cube monotonically. I've added a sentence to the multiple threshold warning in the plugin to explain this behaviour. |
| f" for name: {diagnostic}, threshold {threshold}." | ||
| f" Using closest match: {closest_point}. If multiple" | ||
| f" thresholds are equidistant to the desired threshold," | ||
| f" then the first threshold stated monotonically will" | ||
| f" be used." |
There was a problem hiding this comment.
I think we should add a unit test of this case too.
There was a problem hiding this comment.
Unit test for multiple matching thresholds which are also equidistant has been added.
Addresses #1176
Adding changes to the plugin to choose the closest threshold, when there are multiple matching thresholds available .
Testing: