How to interpret the return result of precisionByThreshold in Spark?

Viewed 91

I am aware of the concept of precisionByThreshold method, while when I use SparkML to implement the linear regression binary classification and print out the analysis result of precisionByThreshold. I got results like this:

Threshold: 1.0, Precision: 0.7158351409978309
Threshold: 0.0, Precision: 0.22472464244616144

Why are there only two thresholds? And when the threshold is 1.0, no sample should be classified as Positive, then the precision should be 0. Can anybody explain this result to me and tell me how to add more threshold? Thanks in advance.

0 Answers
Related