GithubHelp home page GithubHelp logo

fagan2888 / accelerated-pca Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hazyresearch/accelerated-pca

0.0 0.0 0.0 1.26 MB

Accelerated Stochastic Power Iteration with Momentum

Jupyter Notebook 98.60% Julia 1.35% Shell 0.06%

accelerated-pca's Introduction

Stochastic Power Iteration with Momentum

This repository contains the Julia code that produces all the experimental results in the paper Accelerated Stochastic Power Iteration.

Usage

The main code of the implementation for different PCA algorithms is in the file eigensolvers.jl.

  • minibatch_sgd_m(data, x, beta, iters, u, s, seed=1): This function is the implementation for our algorithm Mini-batch Power Method with Momentum. data is the data matrix where eacho row represents a single point, x is the initial point, beta is the momentum parameter, iters is the maximum number of iterations, u is the true eigenvector that is used to compute the error for each iterate, s is the mini-batch size and seed is the random seed.

  • minibatch_svrg_m(data, x, beta, epoch, m, u,s, seed=1): This function is the implementation for our algorithm Variance Reduced Power Method with Momemtum. The argument m is the epoch length and epoch is the number of epochs. The rest arguments are the same as minibatch_sgd_m().

Additionally, we provide a drop-in replacement for sklearn.decomposition.PCA in Momentum-PCA.ipynb.

All the experimental results are generated from the Jupyter notebooks:

  • Mini-batches.ipynb: This notebook shows the acceleration for momentum stochastic power iteration with mini-batching and variance reduction.

  • Stability.ipynb: This notebook shows the instability of Lanczos method for finding multiple eigenvalues.

  • Best_Ball.ipynb: This notebook shows the performance of Best Heavy Ball method that auto-tune the momentum parameter in the power iteration.

  • Inhomogeneous.ipynb: This notebook show the better performance of Inhomogeneous Polynomial Recurrence than the constant momentum power method.

Reference

accelerated-pca's People

Contributors

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