Code Monkey home page Code Monkey logo

lrs-cov-nn's Introduction

Low Rank plus Sparse Decomposition of Covariance Matrices using Neural Network Parametrization

This repository is the official implementation of the paper Low Rank plus Sparse Decomposition of Covariance Matrices using Neural Network Parametrization.

Installation

Clone this git repo and cd into it.

git clone https://github.com/CalypsoHerrera/lrs-cov-nn.git
cd lrs-cov-nn

Then create a virtual environment. Use equivalent command for non debian based systems.

sudo apt-get install python3-venv
python3 -m venv py3
source py3/bin/activate
pip3 install --no-cache-dir -e .
pip install --upgrade pip

Updating requirements

When contributing to project, if adding dependencies, please update the requirements.txt file.

pip freeze > requirements.txt

Running the algorithm

on a synthetic dataset

Generation of a low rank and of a sparse matrix. It is possible to choose the size of the matrix as well as the rank of the low rank matrix L and the sparsity of the sparse matrix S. Then the algorithm is run over the sum of them, Sigma = L+S.

python3 lrs/run_synthetic.py

on a five hundred S&P500 stocks portfolio

Running the algo over a five hundred S&P500 stocks returns covariance matrix and generates images.

python3 lrs/run_sp500.py

on real estate return

Running the algo over a reale sate returns covariance matrix and generates images.

python3 lrs/run_realestate.py

License

This code can be used in accordance with the LICENSE.

Citation

If you use this library for your publications, please cite our paper: Low Rank plus Sparse Decomposition of Covariance Matrices using Neural Network Parametrization

@article{Baes2021Lowrank,
author    = {Baes, Michel and Herrera, Calypso and Neufeld, Ariel and Ruyssen, Pierre},
title     = {Low-Rank plus Sparse Decomposition of Covariance Matrices using Neural Network Parametrization
},
journal   = {CoRR},
volume    = {abs/2104.13669},
year      = {2021},
url       = {https://arxiv.org/abs/1908.00461}}

Last Page Update: 14/06/2021

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.