diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py index 058740e820542..b791e6f169d44 100644 --- a/python/pyspark/ml/classification.py +++ b/python/pyspark/ml/classification.py @@ -999,8 +999,7 @@ def getThreshold(self): raise ValueError( "Logistic Regression getThreshold only applies to" + " binary classification, but thresholds has length != 2." - + " thresholds: " - + ",".join(ts) + + " thresholds: {ts}".format(ts=ts) ) return 1.0 / (1.0 + ts[0] / ts[1]) else: