Git Product home page Git Product logo

bcs's Introduction

BCS

If you find this solver useful, please cite it. You are also welcome to send an email letting us know what you are using it for; then we can include it here as an example. If you would like to add some of your systems as unit tests, just create additional data files with new case identifiers and submit a pull request.

Bayesian Compressive Sensing Standalone Solver

This package makes it easy to find solutions to under-determined matrix problems using the Bayesian Compressive Sensing formalism. See the writeup describing the mathematical background. To get started quickly install the fortpy package from PyPI and run the unit tests. We recommend using a virtualenv for installing fortpy.

pip install fortpy
git clone https://github.com/rosenbrockc/bcs.git
mkdir bcs/staging
cd bcs/
runtests.py . -stagedir staging/

The unit tests will compile the BCS solver on your system, execute them and make sure they get the correct results. If the unit tests are successful, you are ready to solve your own systems.

Running Your Own System

If you examine the staging/ folder that the unit tests were run in, you will find:

  • bcs.do_normal
  • bcs.do_reweighted
  • bcs.do_bcs.

The normal BCS routine finds a single solution to an under-determined problem without reweighting the coefficients to enhance sparsity. Using reweighting reduces the number of coefficients in your solution vector. The do_bcs routine performs multiple fits for either of the other routines (normal or reweighted) using randomly selected subsets from the matrix and measurement vector each time. Inside each of those folders there is a folder tests which contains input files for the tests that were performed. For the quickest start:

  • grab the executable std.x compiled within one of those folders.
  • grab the input files in one of the testing directories
  • replace the contents of the files with your data.

If you are interested in using the solver in your own software, looking at the drivers std.f90 generated by fortpy will show you how to do that. Additionally, the XML Documentation Standard described by fortpy is adhered to so that all the subroutines and functions in the fortran modules are well documented. If you have questions, send me an email.

bcs's People

Contributors

feifzhou avatar rosenbrockc avatar

Watchers

 avatar  avatar

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.