Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14109#discussion_r73643402
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala ---
    @@ -862,27 +873,30 @@ class LinearRegressionSummary private[regression] (
      *    $$
      * </blockquote></p>
      *
    - * @param coefficients The coefficients corresponding to the features.
    + * @param bcCoefficients The broadcast coefficients corresponding to the 
features.
      * @param labelStd The standard deviation value of the label.
      * @param labelMean The mean value of the label.
      * @param fitIntercept Whether to fit an intercept term.
    - * @param featuresStd The standard deviation values of the features.
    - * @param featuresMean The mean values of the features.
    + * @param bcFeaturesStd The broadcast standard deviation values of the 
features.
    + * @param bcFeaturesMean The broadcast mean values of the features.
      */
     private class LeastSquaresAggregator(
    -    coefficients: Vector,
    +    bcCoefficients: Broadcast[Vector],
         labelStd: Double,
         labelMean: Double,
         fitIntercept: Boolean,
    -    featuresStd: Array[Double],
    -    featuresMean: Array[Double]) extends Serializable {
    +    bcFeaturesStd: Broadcast[Array[Double]],
    +    bcFeaturesMean: Broadcast[Array[Double]]) extends Serializable {
     
       private var totalCnt: Long = 0L
       private var weightSum: Double = 0.0
       private var lossSum = 0.0
     
    -  private val (effectiveCoefficientsArray: Array[Double], offset: Double, 
dim: Int) = {
    -    val coefficientsArray = coefficients.toArray.clone()
    +  private val dim = bcCoefficients.value.size
    +  @transient private lazy val featuresStd = bcFeaturesStd.value
    +  @transient private lazy val effectiveCoefAndOffset = {
    --- End diff --
    
    How about "@transient private lazy val (effectiveCoefficientsVector: 
Vector, offset: Double) = ..."


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to