GithubHelp home page GithubHelp logo

provable-low-rank-phase-retrieval's Introduction

Provable Low Rank Phase Retrieval

Provable Low Rank Phase Retrieval (AltMinLowRaP) implementation for solving a matrix of complex valued signals. This implementation is based on the paper "Provable Low Rank Phase Retrieval".

For more information: https://arxiv.org/abs/1902.04972

Programs

The following is a list of which algorithms correspond to which Python script:

  • custom_cgls_lrpr.py - Customized conjugate gradient least squares (CGLS) solver
  • provable_lrpr.py - Implementation of provable LRPR
  • reshaped_wirtinger_flow.py - Implementation of RWF
  • sample_run.py - Example on using provable LRPR implementation

Tutorial

This tutorial can be found in sample_run.py:

import numpy as np
import matplotlib.pyplot as plt
from provable_lrpr import provable_lrpr_fit

# importing sample data
data_name = 'mouse_small_data.npz'

with np.load(data_name) as sample_data:
    vec_X = sample_data['arr_0']
    Y = sample_data['arr_1']
    A = sample_data['arr_2']
    
# initializing parameters
image_dims = [10, 30]
rank = 1
iters = 5

# fitting new X
X_lrpr =  provable_lrpr_fit(Y=Y, A=A, max_iters=iters, rank=rank)

X = np.reshape(vec_X, (image_dims[0], image_dims[1], -1), order='F')
X_lrpr = np.reshape(X_lrpr, (image_dims[0], image_dims[1], -1), order='F')

# plotting results
plt.imshow(np.abs(X[:, :, 0]), cmap='gray')
plt.title('True Image')
plt.show()

plt.imshow(np.abs(X_lrpr[:, :, 0]), cmap='gray')
plt.title('Reconstructed Image via Provable LRPR')
plt.show()

Solution Example

provable-low-rank-phase-retrieval's People

Contributors

soominkwon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

helloimlixin

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.