Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 304e323
  • /
  • tensor_regression.rst
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:7f7f95be0ad66f545ba19bbde938c19e1a1be980
directory badge Iframe embedding
swh:1:dir:304e323b0eff854d09db037388ad409e08df7830
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
tensor_regression.rst
Tensor regression
=================

TensorLy also allows you to perform Tensor Regression.

Setting
-------

Tensor regression is available in the module :mod:`tensorly.regression`.

Given a series of :math:`N` tensor samples/observations, :math:`\tilde X_i, i={1, \cdots, N}`, and corresponding labels :math:`y_i, i={1, \cdots, N}`, we want to find the weight tesor :math:`\tilde W` such that, for each :math:`i={1, \cdots, N}`: 

.. math::

   y_i = \langle \tilde X_i, \tilde W \rangle

We additionally impose that :math:`\tilde W` be a rank-r CP decomposition (Kruskal regression) or a rank :math:`(r_1, \cdots, r_N)`-Tucker decomposition (Tucker regression).
For a detailed explanation on tensor regression, please refer to [1]_.

TensorLy implements both types of tensor regression as scikit-learn-like estimators.

For instance, Krusal regression is available through the :class:`tensorly.regression.KruskalRegression` object. This implements a fit method that takes as parameters `X`, the data tensor which first dimension is the number of samples, and `y`, the corresponding vector of labels.

Given a set of testing samples, you can use the predict method to obtain the corresponding predictions from the model.

References
----------
.. [1] W. Guo, I. Kotsia, and I. Patras. “Tensor Learning for Regression”,
       IEEE Transactions on Image Processing 21.2 (2012), pp. 816–827

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top