Skip to content

Commit

Permalink
[SONA] optimize pool capacity in lbfgs and owlqn
Browse files Browse the repository at this point in the history
  • Loading branch information
ZunwenYou committed Nov 23, 2017
1 parent 771c507 commit ea8c2fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ object SparseLRWithLBFGS {
}

def runLBFGSAngel(trainData: RDD[(OneHotVector, Double)], dim: Int, m: Int, maxIter: Int): Unit = {
val initWeightPS = PSVector.dense(dim, 5 * m).toBreeze
val initWeightPS = PSVector.dense(dim, 3 * m).toBreeze
val tol = 1e-6
val lbfgs = new LBFGS[BreezePSVector](maxIter, m, tol)
val states = lbfgs.iterations(SparseLogistic.PSCost(trainData), initWeightPS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ object SparseLRWithOWLQN {

def runPSOWLQN(trainData: RDD[(OneHotVector, Double)], dim: Int, m: Int, maxIter: Int): Unit = {

val initWeightPS = PSVector.dense(dim, 10 * m).toBreeze

val initWeightPS = PSVector.dense(dim, 3 * m).toBreeze
val regPS = PSVector.duplicate(initWeightPS.component).toBreeze

val tol = 1e-6

val owlqn = new OWLQN(maxIter, m, regPS, tol)
val states = owlqn.iterations(SparseLogistic.PSCost(trainData), initWeightPS)

Expand Down

0 comments on commit ea8c2fa

Please sign in to comment.