Skip to content

GillesBareilles/NonSmoothProblems.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NonSmoothProblems.jl

A collection of structured nonsmooth problems: instances, and usual function and subgradient oracle.

Problems

  • MaxQuad: the maximum of a given set of quadratic functions;
  • EigMaxLinear: the maximum eigenvalue of an affine combination of symmetric matrices.
  • Halfhalf: the euclidean norm of a subset of coordinates of the point plus a quadratic term.

Oracles

Usual nonsmooth oracles

using NonSmoothProblems

pb = Simplel1() # l1 norm
x = rand(10)

F(pb, x)
∂F_elt(pb, x)
is_differentiable(pb, x)

Sometimes, computing these three information require common information, we thus expose as well

firstorderoracle(pb, x)

Structure oracles

Composition type problems

For problems min F(x), with F = f o g,

  • f : ℝᵖ → ℝ nonsmooth (possibly prox-friendly);
  • g : ℝⁿ → ℝᵖ smooth;

we expose

  • the derivatives of g,
  • the manifolds relative to which f is partly-smooth:
    • a type, holding the manifold information
    • a map h : ℝᵖ → ℝᵏ defining manifold points as h(x) = 0 and its derivatives.

Here are some of the available oracles:

const NSP = NonSmoothProblems

pb = MaxQuadBGLS()
x = [-.1263, -.0344, -.0069, .0264, .0673, -.2784, .0742, .1385, .0840, .0386]

NSP.g(pb, x)
NSP.Dg(pb, x)

M = NSP.MaxQuadManifold(pb, [2, 3, 4, 5])
NSP.h(M, x)
NSP.Jac_h(M, x)

Check out the code for all the available oracles.

Maximum eigenvalue problem

“`julia get_eigmax_affine(; m=15, n=2, seed = 1864, Tf=Float64) get_eigmax_AL33(; Tf=Float64) get_eigmax_powercoord(; m=5, n=5, k=2, Tf=Float64) get_eigmax_nlmap(; m=5, n=5, Tf=Float64) “`

Maximum of smooth problems

“`julia MaxQuadBGLS(Tf = Float64) MaxQuad2d(Tf = Float64; ε=0.0) MaxQuadAL(Tf = Float64) “`

TODOs

  • write tests for eigmax oracles