All Projects → ZIB-IOL → FrankWolfe.jl

ZIB-IOL / FrankWolfe.jl

Licence: MIT License
Julia implementation for various Frank-Wolfe and Conditional Gradient variants

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to FrankWolfe.jl

procrustes
Python library for finding the optimal transformation(s) that makes two matrices as close as possible to each other.
Stars: ✭ 48 (+2.13%)
Mutual labels:  optimization, optimization-algorithms
Pygmo2
A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 134 (+185.11%)
Mutual labels:  optimization, optimization-algorithms
Cppnumericalsolvers
a lightweight C++17 library of numerical optimization methods for nonlinear functions (Including L-BFGS-B for TensorFlow)
Stars: ✭ 638 (+1257.45%)
Mutual labels:  optimization, optimization-algorithms
Pagmo2
A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 540 (+1048.94%)
Mutual labels:  optimization, optimization-algorithms
Argmin
Mathematical optimization in pure Rust
Stars: ✭ 234 (+397.87%)
Mutual labels:  optimization, optimization-algorithms
Solid
🎯 A comprehensive gradient-free optimization framework written in Python
Stars: ✭ 546 (+1061.7%)
Mutual labels:  optimization, optimization-algorithms
Optimviz
Visualize optimization algorithms in MATLAB.
Stars: ✭ 106 (+125.53%)
Mutual labels:  optimization, optimization-algorithms
Optim
OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions
Stars: ✭ 411 (+774.47%)
Mutual labels:  optimization, optimization-algorithms
Fewshotlearning
Pytorch implementation of the paper "Optimization as a Model for Few-Shot Learning"
Stars: ✭ 223 (+374.47%)
Mutual labels:  optimization, optimization-algorithms
Python Mip
Collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Stars: ✭ 202 (+329.79%)
Mutual labels:  optimization, optimization-algorithms
Performance-Estimation-Toolbox
Code of the Performance Estimation Toolbox (PESTO) whose aim is to ease the access to the PEP methodology for performing worst-case analyses of first-order methods in convex and nonconvex optimization. The numerical worst-case analyses from PEP can be performed just by writting the algorithms just as you would implement them.
Stars: ✭ 38 (-19.15%)
Mutual labels:  optimization-algorithms, first-order-methods
zoofs
zoofs is a python library for performing feature selection using a variety of nature-inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics-based to Evolutionary. It's easy to use , flexible and powerful tool to reduce your feature size.
Stars: ✭ 142 (+202.13%)
Mutual labels:  optimization, optimization-algorithms
Awesome Robotics
A curated list of awesome links and software libraries that are useful for robots.
Stars: ✭ 478 (+917.02%)
Mutual labels:  optimization, optimization-algorithms
a-tour-of-pytorch-optimizers
A tour of different optimization algorithms in PyTorch.
Stars: ✭ 46 (-2.13%)
Mutual labels:  optimization, optimization-algorithms
Ensmallen
A header-only C++ library for numerical optimization --
Stars: ✭ 436 (+827.66%)
Mutual labels:  optimization, optimization-algorithms
Pyswarms
A research toolkit for particle swarm optimization in Python
Stars: ✭ 742 (+1478.72%)
Mutual labels:  optimization, optimization-algorithms
ForBES
Generic and efficient MATLAB solver for nonsmooth optimization problems
Stars: ✭ 19 (-59.57%)
Mutual labels:  optimization, optimization-algorithms
Ojalgo
oj! Algorithms
Stars: ✭ 336 (+614.89%)
Mutual labels:  optimization, optimization-algorithms
Sporco
Sparse Optimisation Research Code
Stars: ✭ 164 (+248.94%)
Mutual labels:  optimization, optimization-algorithms
geneal
A genetic algorithm implementation in python
Stars: ✭ 47 (+0%)
Mutual labels:  optimization, optimization-algorithms

FrankWolfe.jl

Build Status Dev Coverage

This package is a toolbox for Frank-Wolfe and conditional gradients algorithms.

Overview

Frank-Wolfe algorithms were designed to solve optimization problems of the form min_{x ∈ C} f(x), where f is a differentiable convex function and C is a convex and compact set. They are especially useful when we know how to optimize a linear function over C in an efficient way.

A paper presenting the package with mathematical explanations and numerous examples can be found here:

FrankWolfe.jl: A high-performance and flexible toolbox for Frank-Wolfe algorithms and Conditional Gradients.

Installation

The most recent release is available via the julia package manager, e.g., with

using Pkg
Pkg.add("FrankWolfe")

or the master branch:

Pkg.add(url="https://github.com/ZIB-IOL/FrankWolfe.jl", rev="master")

Getting started

Let's say we want to minimize the Euclidian norm over the probability simplex Δ. Using FrankWolfe.jl, this is what the code looks like (in dimension 3):

julia> using FrankWolfe

julia> f(p) = sum(abs2, p)  # objective function
f (generic function with 1 method)

julia> grad!(storage, p) = storage .= 2p  # in-place gradient computation
grad! (generic function with 1 method)

julia> lmo = FrankWolfe.ProbabilitySimplexOracle(1.)  # function d ⟼ argmin ⟨p,d⟩ st. p ∈ Δ
FrankWolfe.ProbabilitySimplexOracle{Float64}(1.0)

julia> p0 = [1., 0., 0.]
3-element Vector{Float64}:
 1.0
 0.0
 0.0

julia> p_opt, _ = frank_wolfe(f, grad!, lmo, p0; verbose=true);

Vanilla Frank-Wolfe Algorithm.
EMPHASIS: memory STEPSIZE: Adaptive EPSILON: 1.0e-7 MAXITERATION: 10000 TYPE: Float64
MOMENTUM: nothing GRADIENTTYPE: Nothing
WARNING: In memory emphasis mode iterates are written back into x0!

-------------------------------------------------------------------------------------------------
  Type     Iteration         Primal           Dual       Dual Gap           Time         It/sec
-------------------------------------------------------------------------------------------------
     I             0   1.000000e+00  -1.000000e+00   2.000000e+00   0.000000e+00            NaN
    FW          1000   3.333333e-01   3.333333e-01   1.098983e-08   1.468400e-01   6.810132e+03
  Last          1000   3.333333e-01   3.333333e-01   1.098983e-08   1.470088e-01   6.809116e+03
-------------------------------------------------------------------------------------------------


julia> p_opt
3-element Vector{Float64}:
 0.33333334349923327
 0.33333332783841896
 0.3333333286623478

Going further

To explore the content of the package, go to the documentation.

Beyond those presented in the documentation, many more use cases are implemented in the examples folder. To run them, you will need to activate the test environment, which can be done simply with TestEnv.jl (we recommend you install it in your base Julia).

julia> using TestEnv

julia> TestEnv.activate()
"/tmp/jl_Ux8wKE/Project.toml"

julia> include("examples/linear_regression.jl")
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].