Skip to content

Commit

Permalink
changed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shtadinada committed Sep 9, 2024
1 parent 1c5a924 commit ad09a04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/large_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include("../src/abs_lmo.jl")
return max(sum(l_1[i] for i in 1:n-1), sum(l_2[i] for i in 1:n-1))
end

n = 40000
n = 12000

# evaluation point x_base
x_base = [i%2==0 ? -1.5 : 2.0 for i in 1:n]
Expand Down
2 changes: 1 addition & 1 deletion examples/lasso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ x, v, primal, dual_gap, traj_data = as_frank_wolfe(
verbose=true,
max_iteration=1e7
)
@show A, y

11 changes: 5 additions & 6 deletions examples/small_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ include("../src/as_frank_wolfe.jl")
include("../src/abs_linear.jl")
include("../src/abs_lmo.jl")

# CB3
# LQ
function f(x)
return max(x[1]^4+x[2]^2, (2-x[1])^2+(2-x[2])^2, 2*exp(x[2]-x[1]))
return max(-x[1]-x[2], -x[1]-x[2]+x[1]^2+x[2]^2-1)
end



# evaluation point x_base
x_base = [2.0,2.0]
x_base = [-0.5,-0.5]
n = length(x_base)

lb_x = [-5 for in in x_base]
Expand Down Expand Up @@ -76,7 +75,7 @@ x, v, primal, dual_gap, traj_data = as_frank_wolfe(
line_search = FrankWolfe.FixedStep(1.0),
callback=callback,
verbose=true,
max_iteration=6078
max_iteration=1e7
)

@show x_base
Expand Down
2 changes: 1 addition & 1 deletion src/as_frank_wolfe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function as_frank_wolfe(
momentum=nothing,
epsilon=1.0e-7,
max_iteration=1.0e7,
print_iter=1000.0,
print_iter=1.0,
trajectory=false,
verbose=false,
memory_mode::FrankWolfe.MemoryEmphasis=FrankWolfe.InplaceEmphasis(),
Expand Down

0 comments on commit ad09a04

Please sign in to comment.