GithubHelp home page GithubHelp logo

sk413025 / structuredoptimization.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliafirstorder/structuredoptimization.jl

0.0 1.0 0.0 5.34 MB

Structured optimization in Julia

License: Other

Julia 100.00%

structuredoptimization.jl's Introduction

StructuredOptimization.jl

Build status codecov

StructuredOptimization.jl is a high-level modeling language that utilizes a syntax that is very close to the mathematical formulation of an optimization problem.

This user-friendly interface acts as a parser to utilize three different packages:

StructuredOptimization.jl can handle large-scale convex and nonconvex problems with nonsmooth cost functions.

It supports complex variables as well.

Installation

To install the package, hit ] from the Julia command line to enter the package manager, then

pkg> add StructuredOptimization

Usage

A least absolute shrinkage and selection operator (LASSO) can be solved with only few lines of code:

julia> using StructuredOptimization

julia> n, m = 100, 10;                # define problem size

julia> A, y = randn(m,n), randn(m);   # random problem data

julia> x = Variable(n);               # initialize optimization variable

julia> λ = 1e-2*norm(A'*y,Inf);       # define λ    

julia> @minimize ls( A*x - y ) + λ*norm(x, 1); # solve problem

julia> ~x                             # inspect solution
100-element Array{Float64,1}:
  0.0
  0.0
  0.0
  0.440254
  0.0
  0.0
  0.0
[...]

See the documentation for more details about the type of problems StructuredOptimization.jl can handle and the demos to check out some examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.