Skip to content

Commit

Permalink
Drop the iteration limit from 40k to max(400,20n).
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyklebu committed Apr 21, 2014
1 parent e2a01d1 commit 0cb4481
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ private[mllib] object NNLSbyPCG {
val dir = ws.dir
val lastDir = ws.lastDir
val res = ws.res
val iterMax = Math.max(400, 20 * n)
var lastNorm = 0.0
var iterno = 0
var lastWall = 0 // Last iteration when we hit a bound constraint.
var i = 0
while (iterno < 40000) {
while (iterno < iterMax) {
// find the residual
SimpleBlas.gemv(1.0, ata, x, 0.0, res)
SimpleBlas.axpy(-1.0, atb, res)
Expand Down

0 comments on commit 0cb4481

Please sign in to comment.