Github user hhbyyh commented on a diff in the pull request:
https://github.com/apache/spark/pull/19599#discussion_r147562823
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala ---
@@ -133,7 +134,7 @@ class NaiveBayes @Since("1.5.0") (
s" numClasses=$numClasses, but thresholds has length
${$(thresholds).length}")
}
- val modelTypeValue = $(modelType)
+ val modelTypeValue = $lc(modelType)
--- End diff --
option 1: Compare StringParam and candidates after converting them to lower
case. This requires that all the String Constants like `NaiveBayes.Multinomial`
to be lower case.
I don't like writing xxx.toLowerCase(Locale.ROOT) everywhere, so I created
the $lc in Params to centralize it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]