Skip to main content

Fast multidimensional cross approximation in the tensor-train (TT) format and related operations with TT-tensors.

Project description

teneva

Description

This python package, named teneva (tensor evaluation), provides very compact implementation for the multidimensional cross approximation algorithm in the tensor-train (TT) format. This package also contains a function for quickly calculating (using numba package) the values of the constructed low-rank tensor approximation, as well as a number of auxiliary useful utilities for rounding, adding, multiplying TT-tensors, etc.

Notes:

  • This compact implementation does not require a fortran compiler to be installed, unlike the original ttpy python package.
  • The program code is organized within a functional paradigm. Most functions take Y - a list of the TT-cores (3D numpy arrays) - as an input argument and return its updated representation as a new list of TT-cores or some related scalar values (mean, norm, etc.).

Installation

The package (it requires the Python programming language of the version >= 3.6) can be installed via pip: pip install teneva. It can be also downloaded from the repository teneva and installed by python setup.py install command from the root folder of the project.

Required python packages numpy, scipy and numba will be automatically installed during the installation of the main software product.

Examples

See demo/demo.py script, which contains code for approximation of the multivariate (100 dimensional) Rosenbrock function with noise on a uniform grid by various methods (TT-ANOVA, TT-ALS, TT-Cross) and by its combinations.

Tutorials

All materials at the moment are presented in the form of drafts and are written in Russian.

  • Colab-ноутбук Разложение тензорного поезда с подробным описанием специфических особенностей разложения тензорного поезда и демонстрационными примерами.
  • Colab-ноутбук Построение тензорного поезда и округление с описанием метода построения TT-разложения для заданного тензора (алгоритм TT-SVD) и метода дополнительного округления (сжатия) TT-разложения, включая программный код и численные примеры.
  • Colab-ноутбук Алгоритмы maxvol и rect_maxvol с подробным описанием алгоритма maxvol, его программным кодом (в том числе на jax) и демонстрационными примерами.
  • Colab-ноутбук Алгоритм TT-cross с подробным описанием алгоритма TT-cross, его программным кодом и демонстрационными примерами.
  • Colab-ноутбук Алгоритм TT-als с описанием алгоритма TT-ALS, его программным кодом и демонстрационными примерами.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teneva-0.7.0.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

teneva-0.7.0-py3-none-any.whl (17.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page