Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/17645#discussion_r112984129
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/LinearSVC.scala ---
@@ -42,15 +44,35 @@ import org.apache.spark.sql.functions.{col, lit}
/** Params for linear SVM Classifier. */
private[classification] trait LinearSVCParams extends ClassifierParams
with HasRegParam
with HasMaxIter with HasFitIntercept with HasTol with HasStandardization
with HasWeightCol
- with HasThreshold with HasAggregationDepth
+ with HasThreshold with HasAggregationDepth {
+
+ /**
+ * Specifies the loss function. Currently "hinge" and "squared_hinge"
are supported.
+ * "hinge" is the standard SVM loss (a.k.a. L1 loss) while
"squared_hinge" is the square of
+ * the hinge loss (a.k.a. L2 loss).
+ *
+ * @see <a href="https://en.wikipedia.org/wiki/Hinge_loss">Hinge loss
(Wikipedia)</a>
+ *
+ * @group param
+ */
+ @Since("2.3.0")
+ final val lossFunction: Param[String] = new Param(this, "lossFunction",
"Specifies the loss " +
--- End diff --
I'd prefer to move this out to shared params, since it can be used by other
algorithms as well. Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]