Why Confidence Value goes greater then 100 or less then 0 in OpenCV while Detecting objects using custom cascade?

I am detecting objects with Custom Haar Cascade while detecting the cascade is giving correct confidence of some objects which is between 0 and 100 but for some the confidence goes above 100 or below 0 like Confidence equals 132% or -84%.

Why this much high and low confidence?
Also how to solve this issue and get confidence in between 0 and 100?

how do you get a “confidence” there, and what makes you think, it’s in percent ?