The goal is to create a confusion matrix for a chosen model column and compare it with the true column, by discretizing the values into regions.
I have a large dataset where I have constructed a large number of models and created predictions (modelx), and the true values (true) which resemble the following models:
The values of both the models and the true column are between [0,1]. I want to create a function where I can specify regions (Ex: [0, 0.25, 0.5, 0.75, 1]) and discretize a chosen model (a column) into binary values (unless a categorical string would work), whether the values are within the region or not.
In the example above, I have four regions and from here would like to create a confusion matrix of the chosen model.