Code Monkey home page Code Monkey logo

pfopt's Introduction

PFOpt

PFOpt is a MATLAB toolbox for solving large-scale low-rank optimization problems using polynomial-filtered subspace extraction.

Problems and Solvers

PFOpt can be plugged into any optimization solver in which eigenvalue decompositions are required. We provide two example solvers PFPG (polynomial-filtered proximal gradient), and PFGAUGE (polynomial-filtered GAUGE) in the package.

PFPG

PFPG is used for solving

pfpg

Evaluating f(x) and the gradient of f(x) only requires part of the eigenvalues and eigenvectors.

PFGAUGE

PFGAUGE is modified based on the solver GAUGE (by MP Friedlander). The solver is designed for the maximal eigenvalue problem:

pfgauge

This code uses the GAUGE software package described here:

  • Low-rank spectral optimization via gauge duality. M. P. Friedlander and I. Macêdo. SIAM J. on Scientific Computing, 38(3):A1616-A1638, 2016

PFAM

PFAM is used for solving standard or non-linear SDPs. The polynomial filters are applied to perform projections on to the semi-define space.

The sample codes included are designed for solving:

pfam1

Installation

First download the source code and unzip anywhere you like.

Then launch MATLAB and run

>> cd PFOpt
>> pf_setup

You are ready to go!

Feel free to run the examples under the examples folder. Please read the instructions in the corresponding folders, see README.md.

  • simple: simple test routines, see test_pf.m.
  • ncm: nearest correlation matrix problems, see test_synthetic.m and test_real.m.
  • maxeig: maximal eigenvalue problems, see test_phaselift.m.
  • pfam-ext: PFAM for non-linear SDPs, see cryoEMADM.m.

How to Apply PFOpt to Your Own Solver

If your own solver contains eigenvalue decompositions, you can simply plug PFOpt into your codes by following just two steps:

  1. At the beginning of your solver, initialize a workspace for PFOpt.
    work = struct();
    work.degree = 8;
    work.k = -1;
    
    Parameters can be set according to eig_inexact.m optionally.
  2. Replace all your eig or eigs calls with
    [U, d, work] = eig_inexact(A, work);
    
    or
    [U, d, work] = eig_inexact(A, work, n);
    
    if A is a function handle. Note that the workspace work should be passed through all eig_inexact calls. Probably you have to make work as one extra parameter if eig or eigs also appear in one or more subroutines.

Currently PFOpt is able to extract all positive eigenvalues or k largest eigenvalues of a given matrix A. If all negative or k smallest eigenvalues are needed, change A into -A.

References

The authors

We hope that the package is useful for your applications. Please feel free to contact the authors if you have any comments or bug reports.

Copyright

PFOpt

Copyright (C) 2019 Haoyang Liu ([email protected]) Zaiwen Wen ([email protected])

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

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.