0
votes

I have a histogram of a model prediction's from a binary classifier. enter image description here

The vertical line is a movable shape that indicates a decision threshold that I would like to analyze (made editable via the config parameter when creating dcc.Graph.)

dcc.Graph(id='llr-histogram',
                  config={
                    'editable': True,
                    'edits': {
                        'shapePosition': True
                    }
            })

Ideally, the x position of this shape would run as an Input through a callback function that is executed whenever the user moves the red line. I'm wondering if there was an easy way in dash to do this or perhaps a better way to go about the idea.

1

1 Answers

0
votes

In Dash I think the best approach to this would be to add a slider component under the graph: Dash Slider

Link the slider callback to the decision threshold and redraw the chart. Better yet you could use a slider and a button to update the chart once set