iPiano
An implementation of the iPiano algorithms for non-convex and non-smooth optimization.
 All Classes Functions Variables
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iPiano Class Reference

Implementation of iPiano (algorithm 5) as proposed in [1]: [1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM J. Imaging Sciences, vol. 7, no. 2, 2014. More...

#include <ipiano.h>

Inheritance diagram for iPiano:
nmiPiano

Classes

struct  Iteration
 Structure representing an iteration, passed as is to a callback function to be able to monitor process. More...
 
struct  Options
 Options of algorithm. More...
 

Public Member Functions

 iPiano (const std::function< float(const Eigen::MatrixXf &)> f, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)> df, std::function< float(const Eigen::MatrixXf &)> g, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float alpha)> prox_g, Options options, const std::function< void(const Iteration &)> callback=[](const Iteration &iteration) -> void{})
 Constructor. More...
 
 ~iPiano ()
 Destructor.
 
void optimize (Eigen::MatrixXf &x_star, float &f_x_star)
 Optimize the given objective using the iPiano algorithm. More...
 
- Public Member Functions inherited from nmiPiano
 nmiPiano (const std::function< float(const Eigen::MatrixXf &)> f, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)> df, std::function< float(const Eigen::MatrixXf &)> g, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float alpha)> prox_g, Options options, const std::function< void(const Iteration &)> callback=[](const Iteration &iteration) -> void{})
 Constructor. More...
 
 ~nmiPiano ()
 Destructor.
 
void optimize (Eigen::MatrixXf &x_star, float &f_x_star)
 Optimize the given objective using the nmiPiano algorithm. More...
 

Static Public Member Functions

static void silent_callback (const Iteration &iteration)
 Silent callback to use with iPiano. More...
 
static void default_callback (const Iteration &iteration, int n=10)
 Default callback to use with iPiano. More...
 
static void brief_callback (const Iteration &iteration, int n=10)
 Brief callback to use with iPiano. More...
 
static void file_callback (const Iteration &iteration, const std::string &file)
 File callback, used to write all information to the specified file. More...
 
static void plot_callback (const Iteration &iteration, const std::string &file)
 File callback for plotting, writes CSV output of format: iteration,f,g,alpha_n,beta_n,L_n,Delta_n. More...
 
- Static Public Member Functions inherited from nmiPiano
static void silent_callback (const Iteration &iteration)
 Silent callback to use with nmiPiano. More...
 
static void default_callback (const Iteration &iteration, int n=10)
 Default callback to use with nmiPiano. More...
 
static void brief_callback (const Iteration &iteration, int n=10)
 Brief callback to use with nmiPiano. More...
 
static void file_callback (const Iteration &iteration, const std::string &file)
 File callback, used to write all information to the specified file. More...
 
static void plot_callback (const Iteration &iteration, const std::string &file)
 File callback for plotting, writes CSV output of format: iteration,f,g,alpha_n,L_n,Delta_n. More...
 

Protected Member Functions

void initialize (Iteration &iteration)
 Initialize the iteration structure (i.e. set iteration 0): More...
 
- Protected Member Functions inherited from nmiPiano
void initialize (Iteration &iteration)
 Initialize the iteration structure (i.e. set iteration 0): More...
 
float estimateL (const Iteration &iteration)
 
void iterate (Iteration &iteration, float beta, Eigen::MatrixXf &x_np1)
 Do an iteration, i.e. compute x_np1. More...
 
bool checkLipschitz (const Iteration &iteration, const Eigen::MatrixXf &x_np1)
 Check the lipschitz condition for backtracking. More...
 

Protected Attributes

std::function< void(const
Iteration &)> 
callback_
 Callback, note: overwrites nmiPiano::callback_!
 
Options options_
 Options (note: overwrites nmiPiano::options_!).
 
- Protected Attributes inherited from nmiPiano
std::function< float(const
Eigen::MatrixXf &)> 
f_
 The smooth part of the objective function.
 
std::function< void(const
Eigen::MatrixXf
&, Eigen::MatrixXf &)> 
df_
 Gradient of smooth part of the objective function (i.e. derivative).
 
std::function< float(const
Eigen::MatrixXf &)> 
g_
 Convex, nonsmooth part of objective.
 
std::function< void(const
Eigen::MatrixXf
&, Eigen::MatrixXf &, float)> 
prox_g_
 Proximal map for g, i.e. (I + alpha_n*g)^(-1).
 
std::function< void(const
Iteration &)> 
callback_
 Callback, can e.g. be sued to monitor process using the provided information in the Iteration structure.
 
Options options_
 Options.
 

Detailed Description

Implementation of iPiano (algorithm 5) as proposed in [1]: [1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM J. Imaging Sciences, vol. 7, no. 2, 2014.

Implementation of iPiano as described in [1] and [2]:

[1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization SIAM Journal of Imaging Sciences, colume 7, number 2, 2014. [2] D. Stutz. Seminar paper "iPiano: Inertial Proximal Algorithm for Non-Convex Optimization" https://github.com/davidstutz/seminar-ipiano

The code is published under the BSD 3-Clause:

Copyright (c) 2016, David Stutz All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author
David Stutz

Constructor & Destructor Documentation

iPiano::iPiano ( const std::function< float(const Eigen::MatrixXf &)>  f,
const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)>  df,
std::function< float(const Eigen::MatrixXf &)>  g,
const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float alpha)>  prox_g,
Options  options,
const std::function< void(const Iteration &)>  callback = [](const Iteration &iteration) -> void {  } 
)

Constructor.

Parameters
[in]f
[in]df
[in]prox_g
[in]callback

Member Function Documentation

void iPiano::brief_callback ( const Iteration iteration,
int  n = 10 
)
static

Brief callback to use with iPiano.

Parameters
[in]iteration
void iPiano::default_callback ( const Iteration iteration,
int  n = 10 
)
static

Default callback to use with iPiano.

Parameters
[in]iteration
void iPiano::file_callback ( const Iteration iteration,
const std::string &  file 
)
static

File callback, used to write all information to the specified file.

Parameters
[in]iteration
[in]file
void iPiano::initialize ( iPiano::Iteration iteration)
protected

Initialize the iteration structure (i.e. set iteration 0):

Parameters
[in]iteration
void iPiano::optimize ( Eigen::MatrixXf &  x_star,
float &  f_x_star 
)

Optimize the given objective using the iPiano algorithm.

Parameters
[out]x_star
[out]f_x_star
void iPiano::plot_callback ( const Iteration iteration,
const std::string &  file 
)
static

File callback for plotting, writes CSV output of format: iteration,f,g,alpha_n,beta_n,L_n,Delta_n.

Parameters
[in]iteration
[in]file
void iPiano::silent_callback ( const Iteration iteration)
static

Silent callback to use with iPiano.

Parameters
[in]iteration

The documentation for this class was generated from the following file: