From 65ab8d53f0b652f55e3df2e045fccbeea6e37636 Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Fri, 31 Mar 2023 18:52:52 -0400 Subject: [PATCH 01/10] demo svm --- .github/workflows/demos.yml | 5 ++ examples/demo-svm.jl | 136 ++++++++++++++++++++++++++++++++++++ examples/plot-utils-svm.jl | 35 ++++++++++ 3 files changed, 176 insertions(+) create mode 100644 examples/demo-svm.jl create mode 100644 examples/plot-utils-svm.jl diff --git a/.github/workflows/demos.yml b/.github/workflows/demos.yml index 67ca0853..6acb43c9 100644 --- a/.github/workflows/demos.yml +++ b/.github/workflows/demos.yml @@ -84,6 +84,11 @@ jobs: pkg_path = dirname(Base.find_package("RegularizedOptimization")) include(joinpath(pkg_path, "..", "examples", "demo-nnmf-constr.jl")) shell: julia --project="examples" --color=yes {0} + - name: Run SVM demo + run: | + pkg_path = dirname(Base.find_package("RegularizedOptimization")) + include(joinpath(pkg_path, "..", "examples", "demo-svm.jl")) + shell: julia --project="examples" --color=yes {0} - name: Upload results uses: actions/upload-artifact@v3 with: diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl new file mode 100644 index 00000000..ef28982c --- /dev/null +++ b/examples/demo-svm.jl @@ -0,0 +1,136 @@ +using Random +using LinearAlgebra +using ProximalOperators, ShiftedProximalOperators, MLDatasets, RegularizedProblems +using NLPModels, NLPModelsModifiers #ReverseADNLSModels +using RegularizedOptimization +using DataFrames +import SolverBenchmark + +include("plot-utils-svm.jl") + +Random.seed!(1234) + +function demo_solver(nlp_tr, nls_tr, sol_tr, nlp_test, nls_test, sol_test, h, χ, suffix="l0-linf") + options = ROSolverOptions(ν=1.0, β=1e16, ϵa=1e-4, ϵr=1e-4, verbose=10, σmin=1e-5) + suboptions = ROSolverOptions(maxIter = 100) + acc = vec -> length(findall(x -> x < 1, vec)) / length(vec) * 100 + + @info "using R2 to solve with" h + reset!(nlp_tr) + R2_out = R2(nlp_tr, h, options, x0=nlp_tr.meta.x0) + nr2 = neval_obj(nlp_tr) + ngr2 = neval_grad(nlp_tr) + r2train = residual(nls_tr, R2_out.solution) #||e - tanh(b * )||^2, b ∈ {-1,1}^n + r2test = residual(nls_test, R2_out.solution) + @show acc(r2train), acc(r2test) + r2dec = plot_svm(R2_out, R2_out.solution, "r2-$(suffix)") + + @info "using TR to solve with" h χ + reset!(nlp_tr) + TR_out = TR(nlp_tr, h, χ, options, x0=nlp_tr.meta.x0, subsolver_options = suboptions) + trtrain = residual(nls_tr, TR_out.solution) + trtest = residual(nls_test, TR_out.solution) + ntr = neval_obj(nlp_tr) + ngtr = neval_grad(nlp_tr) + @show acc(trtrain), acc(trtest) + trdec = plot_svm(TR_out, TR_out.solution, "tr-$(suffix)") + + @info " using LMTR to solve with" h χ + reset!(nls_tr) + LMTR_out = LMTR(nls_tr, h, χ, options, x0=nls_tr.meta.x0, subsolver_options = suboptions) + lmtrtrain = residual(nls_tr, LMTR_out.solution) + lmtrtest = residual(nls_test, LMTR_out.solution) + nlmtr = neval_residual(nls_tr) + nglmtr = neval_jtprod_residual(nls_tr) + neval_jprod_residual(nls_tr) + @show acc(lmtrtrain), acc(lmtrtest) + lmtrdec = plot_svm(LMTR_out, LMTR_out.solution, "lmtr-$(suffix)") + + @info " using LMTR to solve with" h χ + reset!(nls_tr) + LM_out = LM(nls_tr, h, options, x0=nls_tr.meta.x0, subsolver_options = suboptions) + lmtrain = residual(nls_tr, LM_out.solution) + lmtest = residual(nls_test, LM_out.solution) + nlm = neval_residual(nls_tr) + nglm = neval_jtprod_residual(nls_tr) + neval_jprod_residual(nls_tr) + @show acc(lmtrain), acc(lmtest) + lmdec = plot_svm(LM_out, LM_out.solution, "lm-$(suffix)") + + # c = PGFPlots.Axis( + # [ + # PGFPlots.Plots.Linear(1:length(r2dec), r2dec, mark="none", style="black, dotted", legendentry="R2"), + # PGFPlots.Plots.Linear(1:length(trdec), trdec, mark="none", style="black, dashed", legendentry="TR"), + # PGFPlots.Plots.Linear(LM_out.solver_specific[:ResidHist], lmdec, mark="none", style="black, thick", legendentry="LM"), + # PGFPlots.Plots.Linear(LMTR_out.solver_specific[:ResidHist], lmtrdec, mark="none", style = "black, very thin", legendentry="LMTR"), + # ], + # xlabel="\$ k^{th}\$ \$ f \$ Eval", + # ylabel="Objective Value", + # ymode="log", + # xmode="log", + # ) + # PGFPlots.save("svm-objdec.tikz", c, include_preamble=false) + + # temp = hcat([R2_out.solver_specific[:Fhist][end], R2_out.solver_specific[:Hhist][end],R2_out.objective, acc(r2train), acc(r2test), nr2, ngr2, sum(R2_out.solver_specific[:SubsolverCounter]), R2_out.elapsed_time], + # [TR_out.solver_specific[:Fhist][end], TR_out.solver_specific[:Hhist][end], TR_out.objective, acc(trtrain), acc(trtest), ntr, ngtr, sum(TR_out.solver_specific[:SubsolverCounter]), TR_out.elapsed_time], + # [LM_out.solver_specific[:Fhist][end], LM_out.solver_specific[:Hhist][end], LM_out.objective, acc(lmtrain), acc(lmtest), nlm, nglm, sum(LM_out.solver_specific[:SubsolverCounter]), LM_out.elapsed_time], + # [LMTR_out.solver_specific[:Fhist][end], LMTR_out.solver_specific[:Hhist][end], LMTR_out.objective, acc(lmtrtrain), acc(lmtrtest), nlmtr, nglmtr, sum(LMTR_out.solver_specific[:SubsolverCounter]), LMTR_out.elapsed_time])' + + # df = DataFrame(temp, [:f, :h, :fh, :x,:xt, :n, :g, :p, :s]) + # T = [] + # for i = 1:nrow(df) + # push!(T, Tuple(df[i, [:x, :xt]])) + # end + # select!(df, Not(:xt)) + # df[!, :x] = T + # df[!, :Alg] = ["R2", "TR", "LM", "LMTR"] + # select!(df, :Alg, Not(:Alg), :) + # fmt_override = Dict(:Alg => "%s", + # :f => "%10.2f", + # :h => "%10.2f", + # :fh => "%10.2f", + # :x => "%10.2f, %10.2f", + # :n => "%i", + # :g => "%i", + # :p => "%i", + # :s => "%02.2f") + # hdr_override = Dict(:Alg => "Alg", + # :f => "\$ f \$", + # :h => "\$ h \$", + # :fh => "\$ f+h \$", + # :x => "(Train, Test)", + # :n => "\\# \$f\$", + # :g => "\\# \$ \\nabla f \$", + # :p => "\\# \$ \\prox{}\$", + # :s => "\$t \$ (s)") + # open("svm.tex", "w") do io + # SolverBenchmark.pretty_latex_stats(io, df, + # col_formatters=fmt_override, + # hdr_override=hdr_override) + # end +end + +function demo_svm() + ## load phishing data from libsvm + # A = readdlm("data_matrix.txt") + # b = readdlm("label_vector.txt") + + # # sort into test/trainig + # test_ind = randperm(length(b))[1:Int(floor(length(b)*.1))] + # train_ind = setdiff(1:length(b), test_ind) + # btest = b[test_ind] + # Atest = A[test_ind,:]' + # btrain = b[train_ind] + # Atrain = A[train_ind,:]' + + nlp_train, nls_train, sol_train = svm_train_model()#Atrain, btrain) # + nlp_test, nls_test, sol_test = svm_test_model()#Atest, btest) + nlp_train = LSR1Model(nlp_train) + λ = 1e-1 + h = RootNormLhalf(λ) + χ = NormLinf(1.0) + + + demo_solver(nlp_train, nls_train, sol_train, nlp_test, nls_test, sol_test, h, χ, "lhalf-linf") +end + +demo_svm() + diff --git a/examples/plot-utils-svm.jl b/examples/plot-utils-svm.jl new file mode 100644 index 00000000..9c793400 --- /dev/null +++ b/examples/plot-utils-svm.jl @@ -0,0 +1,35 @@ +import PGFPlots + +function plot_svm(outstruct, sol, name="tr-qr") + Comp_pg = outstruct.solver_specific[:SubsolverCounter] + objdec = outstruct.solver_specific[:Fhist] + outstruct.solver_specific[:Hhist] + x = outstruct.solution + a = PGFPlots.Axis( + [ + PGFPlots.Plots.MatrixPlot(reshape(x, 28, 28); #filename="svm-$(name).tikz", + colormap = PGFPlots.ColorMaps.GrayMap())#, zmin = -700, zmax = 700)#, legendentry="computed"), + # PGFPlots.Plots.Linear(1:length(sol), sol, mark="none", legendentry="exact"), + ], + # xlabel="index", + # ylabel="parameter", + # legendStyle="at={(1.0,1.0)}, anchor=north east, draw=none, font=\\scriptsize", + ) + PGFPlots.save("svm-$(name).pdf", a) + + b = PGFPlots.Axis( + PGFPlots.Plots.Linear(1:length(Comp_pg), Comp_pg, mark="none"), + xlabel="outer iterations", + ylabel="inner iterations", + ymode="log", + ) + PGFPlots.save("svm-inner-outer-$(name).pdf", b) + + c = PGFPlots.Axis( + PGFPlots.Plots.Linear(1:length(objdec), objdec, mark="none"), + xlabel="\$ k^{th}\$ \$ \\nabla f \$ Call", + ylabel="Objective Value", + ymode="log", + ) + PGFPlots.save("svm-objdec-$(name).pdf", c) + return objdec +end From 42d7df84ef1d79012d5eb89d82d9ee6c3d0ff8c6 Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Mon, 3 Apr 2023 10:50:54 -0400 Subject: [PATCH 02/10] add MLDatasets to examples compat --- examples/Project.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/Project.toml b/examples/Project.toml index 3bcbe047..246200b0 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,6 +1,7 @@ [deps] ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" +MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" NLPModelsModifiers = "e01155f1-5c6f-4375-a9d8-616dd036575f" PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa" @@ -11,10 +12,10 @@ RegularizedProblems = "ea076b23-609f-44d2-bb12-a4ae45328278" [compat] ADNLPModels = "0.4" DifferentialEquations = "7" +MLDatasets = "0.5" NLPModels = "0.19" NLPModelsModifiers = "0.6" PGFPlots = "3" ProximalOperators = "0.15" RegularizedOptimization = "0.1" RegularizedProblems = "0.1" - From 43941e41cf12cbb7a284503a307cb5868f524cbc Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Mon, 3 Apr 2023 16:52:51 -0400 Subject: [PATCH 03/10] up compat examples, remove SolverBenchmark svm --- examples/Project.toml | 1 + examples/demo-svm.jl | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Project.toml b/examples/Project.toml index 246200b0..3cac18d9 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,5 +1,6 @@ [deps] ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl index ef28982c..b828f58d 100644 --- a/examples/demo-svm.jl +++ b/examples/demo-svm.jl @@ -4,7 +4,6 @@ using ProximalOperators, ShiftedProximalOperators, MLDatasets, RegularizedProble using NLPModels, NLPModelsModifiers #ReverseADNLSModels using RegularizedOptimization using DataFrames -import SolverBenchmark include("plot-utils-svm.jl") From 34045a0757fcf37742f15d20f950d7681624a1ad Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Tue, 4 Apr 2023 00:12:59 -0400 Subject: [PATCH 04/10] update version MLDatasets --- examples/Project.toml | 3 ++- examples/demo-svm.jl | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/Project.toml b/examples/Project.toml index 3cac18d9..65a31a97 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -9,11 +9,12 @@ PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa" ProximalOperators = "a725b495-10eb-56fe-b38b-717eba820537" RegularizedOptimization = "196f2941-2d58-45ba-9f13-43a2532b2fa8" RegularizedProblems = "ea076b23-609f-44d2-bb12-a4ae45328278" +ShiftedProximalOperators = "d4fd37fa-580c-4e43-9b30-361c21aae263" [compat] ADNLPModels = "0.4" DifferentialEquations = "7" -MLDatasets = "0.5" +MLDatasets = "0.7" NLPModels = "0.19" NLPModelsModifiers = "0.6" PGFPlots = "3" diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl index b828f58d..f963aa32 100644 --- a/examples/demo-svm.jl +++ b/examples/demo-svm.jl @@ -1,9 +1,10 @@ using Random using LinearAlgebra -using ProximalOperators, ShiftedProximalOperators, MLDatasets, RegularizedProblems +using ProximalOperators, ShiftedProximalOperators, RegularizedProblems using NLPModels, NLPModelsModifiers #ReverseADNLSModels using RegularizedOptimization using DataFrames +using MLDatasets include("plot-utils-svm.jl") @@ -120,8 +121,8 @@ function demo_svm() # btrain = b[train_ind] # Atrain = A[train_ind,:]' - nlp_train, nls_train, sol_train = svm_train_model()#Atrain, btrain) # - nlp_test, nls_test, sol_test = svm_test_model()#Atest, btest) + nlp_train, nls_train, sol_train = RegularizedProblems.svm_train_model()#Atrain, btrain) # + nlp_test, nls_test, sol_test = RegularizedProblems.svm_test_model()#Atest, btest) nlp_train = LSR1Model(nlp_train) λ = 1e-1 h = RootNormLhalf(λ) From c697db2d77b15612126b6cb3560c76c9f0735028 Mon Sep 17 00:00:00 2001 From: geoffroyleconte <47035783+geoffroyleconte@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:59:17 -0400 Subject: [PATCH 05/10] Apply suggestions from code review Co-authored-by: Dominique --- examples/demo-svm.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl index f963aa32..d692c3cf 100644 --- a/examples/demo-svm.jl +++ b/examples/demo-svm.jl @@ -1,7 +1,7 @@ using Random using LinearAlgebra using ProximalOperators, ShiftedProximalOperators, RegularizedProblems -using NLPModels, NLPModelsModifiers #ReverseADNLSModels +using NLPModels, NLPModelsModifiers using RegularizedOptimization using DataFrames using MLDatasets @@ -121,14 +121,13 @@ function demo_svm() # btrain = b[train_ind] # Atrain = A[train_ind,:]' - nlp_train, nls_train, sol_train = RegularizedProblems.svm_train_model()#Atrain, btrain) # - nlp_test, nls_test, sol_test = RegularizedProblems.svm_test_model()#Atest, btest) + nlp_train, nls_train, sol_train = RegularizedProblems.svm_train_model() + nlp_test, nls_test, sol_test = RegularizedProblems.svm_test_model() nlp_train = LSR1Model(nlp_train) λ = 1e-1 h = RootNormLhalf(λ) χ = NormLinf(1.0) - demo_solver(nlp_train, nls_train, sol_train, nlp_test, nls_test, sol_test, h, χ, "lhalf-linf") end From 9637751eb22aa412bee056366fe8d398b598b7ef Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Tue, 4 Apr 2023 11:18:00 -0400 Subject: [PATCH 06/10] remove commented code and dataframes --- examples/Project.toml | 1 - examples/demo-svm.jl | 65 -------------------------------------- examples/plot-utils-svm.jl | 6 +--- 3 files changed, 1 insertion(+), 71 deletions(-) diff --git a/examples/Project.toml b/examples/Project.toml index 65a31a97..5b0e105a 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,6 +1,5 @@ [deps] ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl index d692c3cf..d11f04e4 100644 --- a/examples/demo-svm.jl +++ b/examples/demo-svm.jl @@ -3,7 +3,6 @@ using LinearAlgebra using ProximalOperators, ShiftedProximalOperators, RegularizedProblems using NLPModels, NLPModelsModifiers using RegularizedOptimization -using DataFrames using MLDatasets include("plot-utils-svm.jl") @@ -54,73 +53,9 @@ function demo_solver(nlp_tr, nls_tr, sol_tr, nlp_test, nls_test, sol_test, h, χ nglm = neval_jtprod_residual(nls_tr) + neval_jprod_residual(nls_tr) @show acc(lmtrain), acc(lmtest) lmdec = plot_svm(LM_out, LM_out.solution, "lm-$(suffix)") - - # c = PGFPlots.Axis( - # [ - # PGFPlots.Plots.Linear(1:length(r2dec), r2dec, mark="none", style="black, dotted", legendentry="R2"), - # PGFPlots.Plots.Linear(1:length(trdec), trdec, mark="none", style="black, dashed", legendentry="TR"), - # PGFPlots.Plots.Linear(LM_out.solver_specific[:ResidHist], lmdec, mark="none", style="black, thick", legendentry="LM"), - # PGFPlots.Plots.Linear(LMTR_out.solver_specific[:ResidHist], lmtrdec, mark="none", style = "black, very thin", legendentry="LMTR"), - # ], - # xlabel="\$ k^{th}\$ \$ f \$ Eval", - # ylabel="Objective Value", - # ymode="log", - # xmode="log", - # ) - # PGFPlots.save("svm-objdec.tikz", c, include_preamble=false) - - # temp = hcat([R2_out.solver_specific[:Fhist][end], R2_out.solver_specific[:Hhist][end],R2_out.objective, acc(r2train), acc(r2test), nr2, ngr2, sum(R2_out.solver_specific[:SubsolverCounter]), R2_out.elapsed_time], - # [TR_out.solver_specific[:Fhist][end], TR_out.solver_specific[:Hhist][end], TR_out.objective, acc(trtrain), acc(trtest), ntr, ngtr, sum(TR_out.solver_specific[:SubsolverCounter]), TR_out.elapsed_time], - # [LM_out.solver_specific[:Fhist][end], LM_out.solver_specific[:Hhist][end], LM_out.objective, acc(lmtrain), acc(lmtest), nlm, nglm, sum(LM_out.solver_specific[:SubsolverCounter]), LM_out.elapsed_time], - # [LMTR_out.solver_specific[:Fhist][end], LMTR_out.solver_specific[:Hhist][end], LMTR_out.objective, acc(lmtrtrain), acc(lmtrtest), nlmtr, nglmtr, sum(LMTR_out.solver_specific[:SubsolverCounter]), LMTR_out.elapsed_time])' - - # df = DataFrame(temp, [:f, :h, :fh, :x,:xt, :n, :g, :p, :s]) - # T = [] - # for i = 1:nrow(df) - # push!(T, Tuple(df[i, [:x, :xt]])) - # end - # select!(df, Not(:xt)) - # df[!, :x] = T - # df[!, :Alg] = ["R2", "TR", "LM", "LMTR"] - # select!(df, :Alg, Not(:Alg), :) - # fmt_override = Dict(:Alg => "%s", - # :f => "%10.2f", - # :h => "%10.2f", - # :fh => "%10.2f", - # :x => "%10.2f, %10.2f", - # :n => "%i", - # :g => "%i", - # :p => "%i", - # :s => "%02.2f") - # hdr_override = Dict(:Alg => "Alg", - # :f => "\$ f \$", - # :h => "\$ h \$", - # :fh => "\$ f+h \$", - # :x => "(Train, Test)", - # :n => "\\# \$f\$", - # :g => "\\# \$ \\nabla f \$", - # :p => "\\# \$ \\prox{}\$", - # :s => "\$t \$ (s)") - # open("svm.tex", "w") do io - # SolverBenchmark.pretty_latex_stats(io, df, - # col_formatters=fmt_override, - # hdr_override=hdr_override) - # end end function demo_svm() - ## load phishing data from libsvm - # A = readdlm("data_matrix.txt") - # b = readdlm("label_vector.txt") - - # # sort into test/trainig - # test_ind = randperm(length(b))[1:Int(floor(length(b)*.1))] - # train_ind = setdiff(1:length(b), test_ind) - # btest = b[test_ind] - # Atest = A[test_ind,:]' - # btrain = b[train_ind] - # Atrain = A[train_ind,:]' - nlp_train, nls_train, sol_train = RegularizedProblems.svm_train_model() nlp_test, nls_test, sol_test = RegularizedProblems.svm_test_model() nlp_train = LSR1Model(nlp_train) diff --git a/examples/plot-utils-svm.jl b/examples/plot-utils-svm.jl index 9c793400..33489a37 100644 --- a/examples/plot-utils-svm.jl +++ b/examples/plot-utils-svm.jl @@ -6,13 +6,9 @@ function plot_svm(outstruct, sol, name="tr-qr") x = outstruct.solution a = PGFPlots.Axis( [ - PGFPlots.Plots.MatrixPlot(reshape(x, 28, 28); #filename="svm-$(name).tikz", + PGFPlots.Plots.MatrixPlot(reshape(x, 28, 28); colormap = PGFPlots.ColorMaps.GrayMap())#, zmin = -700, zmax = 700)#, legendentry="computed"), - # PGFPlots.Plots.Linear(1:length(sol), sol, mark="none", legendentry="exact"), ], - # xlabel="index", - # ylabel="parameter", - # legendStyle="at={(1.0,1.0)}, anchor=north east, draw=none, font=\\scriptsize", ) PGFPlots.save("svm-$(name).pdf", a) From 8d929470dba3135d4c0e24cc32e01f99cd686461 Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Tue, 4 Apr 2023 12:07:38 -0400 Subject: [PATCH 07/10] add shiftedprox compat version --- examples/Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/Project.toml b/examples/Project.toml index 5b0e105a..8d2d197c 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -20,3 +20,4 @@ PGFPlots = "3" ProximalOperators = "0.15" RegularizedOptimization = "0.1" RegularizedProblems = "0.1" +ShiftedProximalOperators = "0.1" From 9081d6add685503c9daecefe61c8e814ee5f651a Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Tue, 18 Apr 2023 11:24:58 -0400 Subject: [PATCH 08/10] test update solvercore --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index a6a04161..7f0c4afa 100644 --- a/Project.toml +++ b/Project.toml @@ -22,7 +22,7 @@ NLPModelsModifiers = "0.6" ProximalOperators = "0.15" RegularizedProblems = "0.1" ShiftedProximalOperators = "0.1" -SolverCore = "0.3.0" +SolverCore = "0.3" TSVD = "0.4" julia = "^1.6.0" From c08a5c844c3b8c621bdd95ceecd930a1276a2dba Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Wed, 4 Oct 2023 20:34:02 -0400 Subject: [PATCH 09/10] update ADNLPModels --- examples/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Project.toml b/examples/Project.toml index 8d2d197c..59e1de76 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -11,7 +11,7 @@ RegularizedProblems = "ea076b23-609f-44d2-bb12-a4ae45328278" ShiftedProximalOperators = "d4fd37fa-580c-4e43-9b30-361c21aae263" [compat] -ADNLPModels = "0.4" +ADNLPModels = "0.6" DifferentialEquations = "7" MLDatasets = "0.7" NLPModels = "0.19" From af83d5a8af4050b9ea69aae8d15d5b7d820fd32e Mon Sep 17 00:00:00 2001 From: Geoffroy Leconte Date: Wed, 4 Oct 2023 23:04:31 -0400 Subject: [PATCH 10/10] change order import --- examples/demo-svm.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-svm.jl b/examples/demo-svm.jl index d11f04e4..631672bc 100644 --- a/examples/demo-svm.jl +++ b/examples/demo-svm.jl @@ -1,9 +1,9 @@ using Random using LinearAlgebra +using MLDatasets using ProximalOperators, ShiftedProximalOperators, RegularizedProblems using NLPModels, NLPModelsModifiers using RegularizedOptimization -using MLDatasets include("plot-utils-svm.jl")