This method is failing because of TypeError in eveluation.py line 142.
I believe in lines 141 and 142,
select(scoreCol, labelCol).rdd.map((lambda row:(float(row [scoreCol][1]) , float(row[labelCol]))) should change to the following:
select(scoreCol, labelCol).rdd.map((lambda row:(float(row [scoreCol]) , float(row[labelCol])))
The API does what it has to do. The output of a Binaryclassifier in spark.ml spark is a DenseVector which socreCol[1] refers to the probability that the data belong to class 1.
This method is failing because of TypeError in eveluation.py line 142.
I believe in lines 141 and 142, select(scoreCol, labelCol).rdd.map((lambda row:(float(row [scoreCol][1]) , float(row[labelCol]))) should change to the following: select(scoreCol, labelCol).rdd.map((lambda row:(float(row [scoreCol]) , float(row[labelCol])))