I am doing a multiclass prediction with random forest in Spark ML.
For this MulticlassClassificationEvaluator() in spark ML, is it possible to get precision/recall by each class labels?
Currently, I am only seeing precision/recall combined for all class together.
Looking at the class documentation this doesn't seem to be possible, using the built-in methods.
Although not exactly what you are looking for, you could use
weightedPrecision
andweightedRecall
in themetricName
method. This will at least account for class imbalances.