GithubHelp home page GithubHelp logo

fujikawas / svd_update Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexgrig/svd_update

0.0 0.0 0.0 172 KB

In this repository there are code for updating SVD decomposition. Updating means recomputing SVD faster when adding new column (or row).

Python 100.00%

svd_update's Introduction

SVD-UPDATE: Fast recalculation of SVD for new attached column (row)

This module implements SVD update i. e. fast recalculation of SVD for new matrix column (row).

Important references for this method are given in:

  1. [1] Gu, M. & Eisenstat, S. C. "A Stable and Fast Algorithm for Updating the Singular Value Decomposition", Yale University, 1993

  2. [2] Brand, M. "Fast low-rank modifications of the thin singular value decomposition", Linear Algebra and its Applications , 2006, 415, 20 - 30

  3. [3] Stange, P. "On the Efficient Update of the Singular Value Decomposition Subject to Rank-One Modifications", 2009

Install:

For this package to work only Numpy, Scipy and Matplotlib are required. Matplotlib is used only in testing functions. However, Scipy need to be compiled from sources in order to use some LAPACK function "dlasd4" which are not exposed originally.

To include this function follow these steps:

  1. Copy the file "For_scipy_modification_flapack.pyf.src" from this package to {path to scipy source directory}/scipy/linalg/.

  2. Rename the present file "flapack.pyf.src" (for instance to "flapack.pyf.src.old") to restore it if needed.

    Actually this, file has been used for Scipy version 0.12.0c1. If you use older verions of scipy you can track modifications (there are not many) in file "For_scipy_modification_flapack.pyf.src" and add those to the "flapack.pyf.src" in the new distibution.

  3. And rename the copied file to "flapack.pyf.src"

  4. Build and install scipy using standard instructions.

Usage:

There are two interfaces to SVD update.

  • The function "SVD_update" is used to update SVD only once. It returns SVD of a matrix with one extra column (or row) attached.

  • The class SVD_updater is used to perform many sequential updates. It uses some extra techniques to speed up computations in sequential updates. These techniques are presented in the paper [2].

svd_update's People

Contributors

alexgrig 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.