Example #1
0
                                h="l1",
                                l_reg=l_reg,
                                L=L,
                                display=0)
 x2, f2, hist2 = p0b.prox_0bfgs(f,
                                gf,
                                x0,
                                h="l1",
                                l_reg=l_reg,
                                L=L,
                                display=0,
                                line_search=True)
 x3, f3, hist3 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1",
                               l_reg=l_reg,
                               L=L,
                               display=0)
 x4, f4, hist4 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1",
                               l_reg=l_reg,
                               L=L,
                               display=0,
                               line_search=True)
 x5, f5, hist5 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1",
Example #2
0
                                gf,
                                x0,
                                h="l1",
                                l_reg=l_reg,
                                display=0)
 x2, f2, hist2 = p0b.prox_0bfgs(f,
                                gf,
                                x0,
                                h="l1",
                                l_reg=l_reg,
                                display=0,
                                line_search=True)
 x4, f4, hist4 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1",
                               l_reg=l_reg,
                               display=0,
                               line_search=True)
 x6, f6, hist6 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1",
                               l_reg=l_reg,
                               display=0,
                               exact=True,
                               line_search=True)
 timing += np.array([
     hist1.times[-1], hist2.times[-1], 0, hist4.times[-1], 0,
     hist6.times[-1]
 ])
Example #3
0
 # set up problem 5
 x0, x0_lbfgsb, f, f_lbfgsb, gf, gf_lbfgsb, bounds, bounds_lbfgsb, l_reg = setup_problem5(
 )
 # run Prox0BFGS and Prox0SR1 comparison
 x1, f1, hist1 = p0b.prox_0bfgs(f,
                                gf,
                                x0,
                                h="l1_box",
                                l_reg=l_reg,
                                bounds=bounds,
                                display=0,
                                tol=1e-5)
 x3, f3, hist3 = p0s.prox_0sr1(f,
                               gf,
                               x0,
                               h="l1_box",
                               l_reg=l_reg,
                               bounds=bounds,
                               display=0,
                               tol=1e-5)
 # compute optimal solution to high precision
 xopt, fopt, hist = p0b.prox_0bfgs(f,
                                   gf,
                                   x0,
                                   h="l1_box",
                                   l_reg=l_reg,
                                   bounds=bounds,
                                   line_search=True,
                                   tol=1e-7,
                                   tol_ssn=1e-12)
 # compute ProxGrad and LBFGSB for plotting
 x7, f7, hist7 = pg.prox_grad(f,