[SPARK-24132][ML] Instrumentation improvement for classification
authorLu WANG <lu.wang@databricks.com>
Wed, 9 May 2018 04:20:58 +0000 (21:20 -0700)
committerXiangrui Meng <meng@databricks.com>
Wed, 9 May 2018 04:20:58 +0000 (21:20 -0700)
commit7e7350285dc22764f599671d874617c0eea093e5
tree3b58706a08ae4cdb615a948ab9b86984ada2040d
parent9498e528d21e286e496da6ea9bf9c7ad73a7b5bd
[SPARK-24132][ML] Instrumentation improvement for classification

## What changes were proposed in this pull request?

- Add OptionalInstrumentation as argument for getNumClasses in ml.classification.Classifier

- Change the function call for getNumClasses in train() in ml.classification.DecisionTreeClassifier, ml.classification.RandomForestClassifier, and ml.classification.NaiveBayes

- Modify the instrumentation creation in ml.classification.LinearSVC

- Change the log call in ml.classification.OneVsRest and ml.classification.LinearSVC

## How was this patch tested?

Manual.

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Lu WANG <lu.wang@databricks.com>

Closes #21204 from ludatabricks/SPARK-23686.
mllib/src/main/scala/org/apache/spark/ml/classification/DecisionTreeClassifier.scala
mllib/src/main/scala/org/apache/spark/ml/classification/LinearSVC.scala
mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala
mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala
mllib/src/main/scala/org/apache/spark/ml/classification/RandomForestClassifier.scala