Giter Site home page Giter Site logo

tensorly-gcp's Introduction

TensorLy-Gcp

TensorLy-Gcp is a Python library for generalized parafac decomposition (GCP) [1] and its stochastic version (SGCP) [2] which allow using different kind of losses rather than only Euclidean that builds on top of TensorLy. Both algorithms aim at decreasing loss between the input tensor and estimated tensor by using gradient which is calculated according to the selected loss by the user.

While GCP implementation uses Limited-memory BFGS (LBFGS) method for optimization, SGCP uses ADAM optimization as in [2]. Following losses can be used in Tensorly-Gcp:

  • Rayleigh
  • Bernoulli odds
  • Bernoulli logit
  • Gamma
  • Poisson count
  • Poisson log
  • Gaussian

Contributing

At the moment, only Numpy backend is supported to implement GCP and SGCP. This library can be compatible with other backends (Pytorch, Tensorflow, Jax, Mxnet) by improving LBFGS with the given information in here. Then, this library can be merged in TensorLy.

Usage

It is possible select one of the losses from the list above according to your data distribution and you can apply generalized decomposition easily:

from tlgcp import generalized_parafac
rank = 3
loss = 'rayleigh'
tensorgcp, errorsgcp = generalized_parafac(tensor, rank=rank, loss=loss)

Installing TensorLy-GCP

Through pip

pip install tensorly-gcp   

From source

git clone https://github.com/tensorly/gcp
cd gcp
pip install -e .

References

tensorly-gcp's People

Contributors

caglayantuna avatar cohenjer 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.