Calculate probability MLLIB SVM multi-class

I would like to know how to calculate the probability of using Spark MLLIB SVM in a multiclass classification. The documentation shows that there is no such function. LibSVM uses Platt scaling .

My questions:

  • Is there a function to calculate the probability somewhere?
  • If not, who can help me implement such functionality?

I would just take the average distances from all auxiliary vectors for each category after training and compare the distance from the new data point to the hyperplanes from all classifiers. I think SVMModel.predict () gives these distances, but I'm not sure.


source to share

All Articles