splink
splink copied to clipboard
[MAINT] Add a default value to the `threshold_selection_tool` chart
Is your proposal related to a problem?
The threshold_selection_tool
chart is currently rendered without a default value, resulting in the chart not displaying the confusion matrix until the user hovers over the HTML output.
Describe the solution you'd like
Add a default threshold that the user can adjust. In the absence of this, set the default to point that maximises the f1 score.
Not displaying the confusion matrix until the user hovers over the HTML output is not the full issue:
Once the user hovers over the HTML output, the leftmost text of the confusion matrix is not shown. For example, only "cted" in "Predicted" is shown. Tested on Windows with Splink versions 3.9.14 and 3.9.15.
The URL for the Vega editor is too long to be saved as a comment. I used this code to reproduce the issue:
mychart = linker.threshold_selection_tool_from_labels_table(labels_table2)
mychart.to_url()
Perhaps helpful, the Vega editor in the "LOGS" states: [Warning] text dropped as it is incompatible with "rect"
.