You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by WeichenXu123 <gi...@git.apache.org> on 2017/10/18 10:17:27 UTC
[GitHub] spark pull request #17862: [SPARK-20602] [ML]Adding LBFGS optimizer and Squa...
Github user WeichenXu123 commented on a diff in the pull request:
https://github.com/apache/spark/pull/17862#discussion_r145369694
--- Diff: mllib/src/main/scala/org/apache/spark/ml/classification/LinearSVC.scala ---
@@ -282,8 +348,27 @@ class LinearSVC @Since("2.2.0") (
@Since("2.2.0")
object LinearSVC extends DefaultParamsReadable[LinearSVC] {
+ /** String name for Limited-memory BFGS. */
+ private[classification] val LBFGS: String = "l-bfgs".toLowerCase(Locale.ROOT)
+
+ /** String name for Orthant-Wise Limited-memory Quasi-Newton. */
+ private[classification] val OWLQN: String = "owlqn".toLowerCase(Locale.ROOT)
+
+ /* Set of optimizers that LinearSVC supports */
+ private[classification] val supportedSolvers = Array(LBFGS, OWLQN)
+
+ /** String name for Hinge Loss. */
+ private[classification] val HINGE: String = "hinge".toLowerCase(Locale.ROOT)
+
+ /** String name for Squared Hinge Loss. */
+ private[classification] val SQUARED_HINGE: String = "squared_hinge".toLowerCase(Locale.ROOT)
--- End diff --
Why need `.toLowerCase(Locale.ROOT)` here ?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org