I would also try to round these values to the next neighboring class index.
Alternatively, you could try to find thresholds using ROCs, but as explained before, your use case is rather unusual so you would most likely have to write a custom approach.