How to specify the "positive class" in sparkml binary classification? (Or
perhaps: How does a MulticlassClassificationEvaluator
<https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.evaluation.MulticlassClassificationEvaluator.html?highlight=multiclassclassificationevaluator>
determine
which class is the "positive" one when evaluating for, say, F1 or even just
Recall?)
I have a Pipeline like...

pipeline = Pipeline(stages=[label_idxer, feature_idxer, onehotencoder,
assembler, my_ml_algo, label_converter])

crossval = CrossValidator(estimator=pipeline,
                          evaluator=MulticlassClassificationEvaluator(
                              labelCol=my_ml_algo.getLabelCol(),
                              predictionCol=my_ml_algo.getPredictionCol(),
                              metricName="f1"),
                          numFolds=3)

Is there a way to specify which label or index is the positive/negative
class?

Reply via email to