Git Product home page Git Product logo

coo-pda's Introduction

About

This is a supplementary code (in Python 3.5) for the paper R. Luke and Y. Malitsky “Block-coordinate primal-dual method for the nonsmooth minimization over linear constraints”

Usage

There are 3 problems: basis pursuit, noisy basis pursuit and robust principal component analysis; for each problem there is an independent folder.

Basis pursuit

The folder contains codes for the primal-dual and coordinate primal-dual algorithms. In order to reproduce the results obtained in the paper, one needs to run basis_pursuit.py. The results will be written in the folder results in org-format. (If you use Emacs, it is easy to transform them into html files). The original html files are included.

Basis pursuit with noise

Since the results for these problem are mostly plots, in order to see them you have to run Noisy Basis Pursuit.ipynb in the Jupyter notebook.

Robust PCA

There is only one file robust_pca.py that you have to run in order to see the results. The results will be written to the folder results in org-format. The original html files are also included.

Dependencies

The most important thing that you need for running code for the first two problems is Numba library. It produces an optimized machine code using the LLVM compiler. It might be somehow complicated to install it for your system. We recommend to use it either using Anaconda distribution or NixOS packages for python. The reason to use Numba for the coordinate versions of the primal-dual algorithm is obvious: one epoch of the standard primal-dual algorithm (which is in fact just one iteration) is based only on the fast numpy (already precompiled) functions. However, one epoch of the coordinate PDA will need to use for loop which is of course much slower. Hence, to have a fair comparison, we need the most expensive operations for both methods to have pre-compiled.

If you encounter problems while installing Numba, you still can use this code. You just need to comment the decorators of Numba in all files. It is the following line @jit(nopython=True, nogil=True, cache=True). But of course now the results relating cpu time will be different.

Another maybe non-standard library is tabulate. We use it only for formatting the results in org-mode form. This one is easy to install.

coo-pda's People

Watchers

 avatar

Forkers

lalajiayou

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.