Skip to content

mohammadbashiri/tensor-decomposition-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensor Decomposition in Python

This repository gives a quick tutorial on implementing Canonical Polyadic tensor decomposition in Python, including a brief introduction to Tensor decomposition. However, the main purpose of this notebook is to focus on the implementation of tensor decomposition in Python. In line with these objectives, we will implement tensor decomposition using two libraries available in Python (TensorLy and tensortools) and a simple implementation of Tensor Decomposition with Numpy (via alternating optimization). Furthermore, the result of these three approaches are compared in terms of reconstruction error and execution time.

Content

  1. Tensor Decomposition
  2. Implementation
    • TensorLy
    • tensortools
    • Numpy
  3. Results and Comparison

Tensor Decomposition

Fig1

Example Scenario (with a neuroscientific theme)

Fig1 Fig1

Example Results and Comparison

Fig1 Fig1

For the complete tutorial click here, and for the extended version click here.


Dependencies

  • Numpy
  • Matplotlib
  • Seaborn
  • TensorLy
  • tensortools

Acknowledgement

I would like to thank Annika Thierfelder for her constructive feedback on the content.


References

  • Tuncer, Yalcin, Murat M. Tanik, and David B. Allison. "An overview of statistical decomposition techniques applied to complex systems." Computational statistics & data analysis 52.5 (2008): 2292–2310.
  • Cichocki, Andrzej, et al. "Tensor decompositions for signal processing applications: From two-way to multiway component analysis." IEEE Signal Processing Magazine 32.2 (2015): 145–163.
  • Williams, Alex H., et al. "Unsupervised Discovery of Demixed, Low-Dimensional Neural Dynamics across Multiple Timescales through Tensor Component Analysis." Neuron (2018).
  • Talk by Tamara Kolda
  • Tutorial by Alex Williams: part 1, part 2

About

A short tutorial on implementing Canonical Polyadic (CP) tensor decomposition in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages