Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ import org.apache.spark.rdd.RDD
* Model fitted by [[IterativelyReweightedLeastSquares]].
* @param coefficients model coefficients
* @param intercept model intercept
* @param diagInvAtWA diagonal of matrix (A^T * W * A)^-1 in the last iteration
* @param numIterations number of iterations
*/
private[ml] class IterativelyReweightedLeastSquaresModel(
val coefficients: DenseVector,
val intercept: Double) extends Serializable
val intercept: Double,
val diagInvAtWA: DenseVector,
val numIterations: Int) extends Serializable

/**
* Implements the method of iteratively reweighted least squares (IRLS) which is used to solve
Expand Down Expand Up @@ -103,6 +107,7 @@ private[ml] class IterativelyReweightedLeastSquares(

}

new IterativelyReweightedLeastSquaresModel(model.coefficients, model.intercept)
new IterativelyReweightedLeastSquaresModel(
model.coefficients, model.intercept, model.diagInvAtWA, iter)
}
}
Loading