Interactive confusion matrix in bokeh

I’d like to plot an interactive confusion matrix in bokeh, since i’m new to python i’m having difficulties with writing the code.

The idea is to have a slider for the threshold (from 0 to 1) and given a vector of real binary outcomes (1,0,0,0,1,1...) and a vector predicted probabilities (0.23,0.54,0.78,0.63,0.1,0.92...) the plot should represent a 2X2 confusion matrix.