Github user WeichenXu123 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19020#discussion_r143727850
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala ---
@@ -208,6 +292,26 @@ class LinearRegression @Since("1.3.0")
(@Since("1.3.0") override val uid: String
def setAggregationDepth(value: Int): this.type = set(aggregationDepth,
value)
setDefault(aggregationDepth -> 2)
+ /**
+ * Sets the value of param [[loss]].
+ * Default is "squaredError".
+ *
+ * @group setParam
+ */
+ @Since("2.3.0")
+ def setLoss(value: String): this.type = set(loss, value)
+ setDefault(loss -> SquaredError)
+
+ /**
+ * Sets the value of param [[epsilon]].
+ * Default is 1.35.
+ *
+ * @group setExpertParam
+ */
+ @Since("2.3.0")
+ def setEpsilon(value: Double): this.type = set(epsilon, value)
--- End diff --
Document `epsilon` param more clearly, including the comment that it
matches sklearn and is "M" from the paper.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]