Giter Club home page Giter Club logo

wlra's Introduction

Weighted low rank approximation

Introduction

We are interested in solving the weighted low-rank approximation problem:

\[ min\mathbf{Z} ∑i,j wij \left(xij - zij \right)^2 \]

where \(n × p\) target matrix \(\mathbf{X}\) and \(n × p\) weight matrix \(\mathbf{W}\) are given, and \(\mathbf{Z}\) is constrained to some rank.

Solving WLRA allows us to solve two main problems:

  1. Learn low rank structure in non-Gaussian data. Using Taylor expansion of non-Gaussian likelihoods, we can rewrite the MLE of factor models as the solution to WLRA. The key idea is that the Taylor expansion is performed around a different value for each observation, naturally leading to an iterative approach.
  2. Handle truly missing data. By setting weights to zero, we can code missing data. This approach works even in settings where observations can also take the value zero, such as single cell RNA sequencing data.

Installation

pip install git+https://www.github.com/aksarkar/wlra.git#egg=wlra

Example

np.random.seed(0)
l = np.random.normal(size=(n, 3))
f = np.random.normal(size=(3, p))
eta = l.dot(f)
x = np.random.poisson(lam=np.exp(eta))
res = pois_lra(x, rank=3)

wlra's People

Contributors

aksarkar avatar

Stargazers

Martin Jinye Zhang avatar Debut avatar Wang Bomin avatar FishHe avatar Giovanni avatar Robert Bassett avatar

Watchers

 avatar James Cloos 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.