See also

Spark's 2.0 documentation for OneVsRest() can be found at:

http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.ml.classification.OneVsRest

Another way to visualize this is, to assess for a given binary classifier can we break down an n-class input into N number of logistic regressions and then pick the one that describes the data the best. There are numerous examples of this classifier using Scikit Learn library in Python as follows:

http://scikit-learn.org/stable/modules/generated/sklearn.multiclass.OneVsOneClassifier.html#sklearn.multiclass.OneVsOneClassifier

But we recommend you do a quick scan of the actual Scala source code (less than 400 lines only) at GitHub:

https://github.com/apache/spark/blob/v2.0.2/mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala ...

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.