stephenslab / mixsqp

R package for fast maximum-likelihood estimation of mixture proportions using SQP.
https://bit.ly/2NtYHWT
Other
11 stars 7 forks source link

Another (more difficult) example in which mixSQP fails to converge #19

Closed pcarbo closed 6 years ago

pcarbo commented 6 years ago

This example is from @willwerscheid.

library(mixsqp)
load("flashr.example.RData")
out <- mixsqp(L)
# Step size is too small; consider increasing "eps" and/or "delta", 
# or relaxing convergence criteria.

flashr.example.RData.gz

pcarbo commented 6 years ago

With a different starting point, the algorithm converges, but highlights a secondary issue that the active-set step does not converge:

x0    <- rep(0,7)
x0[7] <- 1
out   <- mixsqp(L,x0 = x0)
# Running mix-SQP algorithm 0.1-86 on 1000 x 7 matrix
# convergence tol. (SQP):     1.0e-08
# conv. tol. (active-set):    1.0e-10
# zero threshold (solution):  1.0e-06
# zero thresh. (search dir.): 1.0e-08
# max. iter (SQP):            1000
# max. iter (active-set):     100
# iter    objective max(rdual) nnz max.diff nqp nls
#    1 +1.32221e+00 +3.783e+00   1       NA  NA  NA
#    2 +1.27001e+00 +2.429e+00   4 5.00e-01  11   2
#    3 +1.26479e+00 +3.129e+02   4 5.00e-01  11   1
#    4 +1.02631e+00 +1.526e+02   4 2.65e-01   8   1
#    5 +8.97115e-01 +6.970e+01   4 1.25e-01   2   1
#    6 +8.59612e-01 +3.022e+01   4 3.30e-02   2   1
#    7 +8.55914e-01 +1.239e+01   4 1.49e-02   2   1
#    8 +8.53133e-01 +5.059e+00   4 4.08e-02   2   1
#    9 +8.46116e-01 +2.145e+00   4 7.68e-02   2   1
#   10 +8.33843e-01 +9.354e-01   5 1.35e-01   4   1
#   11 +8.16678e-01 +4.189e-01   6 2.23e-01   4   1
#   12 +8.00031e-01 +1.782e-01   6 1.49e-01   5   1
#   13 +7.93809e-01 +8.061e-02   6 2.96e-02   2   1
#   14 +7.91050e-01 +3.253e-02   6 9.05e-02   2   1
#   15 +7.88112e-01 +7.526e-03   7 7.57e-02 100   1
#   16 +7.87051e-01 +6.468e-04   7 6.44e-02 100   1
#   17 +7.86949e-01 +6.327e-06   7 7.57e-03 100   1
#   18 +7.86948e-01 -1.968e-08   7 7.38e-05 100   1
# Convergence criteria met---optimal solution found.