RankingEvaluator

class RankingEvaluator.RankingEvaluator(rawPredictionCol='rawPrediction', labelCol='label', metricName='ndcgAt', k=3)[source]

Bases: pyspark.ml.evaluation.JavaEvaluator, pyspark.ml.param.shared.HasLabelCol, pyspark.ml.param.shared.HasPredictionCol, pyspark.ml.util.JavaMLReadable, pyspark.ml.util.JavaMLWritable

getK()[source]

Gets the value of metricName or its default value.

getMetricName()[source]

Gets the value of metricName or its default value.

getMetricsMap(dataframe)[source]
getRawPredictionCol()[source]

Gets the value of rawPredictionCol or its default value.

k = Param(parent='undefined', name='k', doc='k')
labelCol = Param(parent='undefined', name='labelCol', doc='labelCol')
metricName = Param(parent='undefined', name='metricName', doc='metric name in evaluation - one of:\n map - \n ndcgAt - \n mapk - \n recallAtK - \n diversityAtK - \n maxDiversity - ')
nItems = Param(parent='undefined', name='nItems', doc='number of items')
rawPredictionCol = Param(parent='undefined', name='rawPredictionCol', doc='rawPredictionCol')
setK(value)[source]

Sets the value of metricName.

setMetricName(value)[source]

Sets the value of metricName.

setNumberItems(value)[source]

Sets the value of nItems.

setParams(self, rawPredictionCol="rawPrediction", labelCol="label", metricName="ndcgAt")[source]

Sets params for binary classification evaluator.

setRawPredictionCol(value)[source]

Sets the value of rawPredictionCol.