zhengruifeng commented on code in PR #50825:
URL: https://github.com/apache/spark/pull/50825#discussion_r2078837891
##########
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala:
##########
@@ -879,23 +892,31 @@ object LinearRegressionModel extends
MLReadable[LinearRegressionModel] {
*
* @param predictions predictions output by the model's `transform` method.
* @param objectiveHistory objective function (scaled loss + regularization)
at each iteration.
+ * @param coefficientArray Coefficients of the linear regression model, only
necessary when
+ * diagInvAtWA is not Array(0).
*/
@Since("1.5.0")
class LinearRegressionTrainingSummary private[regression] (
predictions: DataFrame,
predictionCol: String,
labelCol: String,
featuresCol: String,
- model: LinearRegressionModel,
+ private val weightCol: String,
+ private val numFeatures: Int,
+ private val fitIntercept: Boolean,
diagInvAtWA: Array[Double],
- val objectiveHistory: Array[Double])
+ val objectiveHistory: Array[Double],
+ private val coefficientArray: Array[Double] = Array.emptyDoubleArray)
Review Comment:
the `coefficientArray` is only used to compute `tValues` when `diagInvAtWA
!= Array(0)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]