# 3. Tensor decomposition by DelayedTensor

Authors: Koki Tsuyuzaki [aut, cre]
Last modified: 2025-11-02 14:46:33.503126
Compiled: Sun Nov 2 14:48:30 2025

# Setting

    suppressPackageStartupMessages(library("DelayedTensor"))
    suppressPackageStartupMessages(library("DelayedArray"))
    suppressPackageStartupMessages(library("HDF5Array"))
    suppressPackageStartupMessages(library("DelayedRandomArray"))

    darr <- RandomUnifArray(c(3,4,5))

    setVerbose(FALSE)
    setSparse(FALSE)
    setAutoBlockSize(1E+8)

    ## automatic block size set to 1e+08 bytes (was 1e+08)

    tmpdir <- tempdir()
    setHDF5DumpDir(tmpdir)

# Tensor Decomposition

Tensor decomposition models decompose multiple factor matrices and core tensor. Each factor matrix means the patterns of each mode and is used for the visualization and the downstream analysis. Core tensor means the intensity of the patterns and is used to decide which patterns are informative.

We reimplemented some of the tensor decomposition functions of rTensor using block processing of DelayedArray.

Only tensor decomposition algorithms and utility functions that require Fast Fourier Transform (e.g., `t_mult`, `t_svd`, and `t_svd_reconstruct`) are exceptions and have not yet been implemented in DelayedArray because we are still investigating how to calculate them with out-of-core manner.

## Tucker Decomposition

Suppose a tensor \(\mathcal{X} \in \Re^{I \times J \times K}\). Tucker decomposition models decomposes a tensor \(\mathcal{X}\) into a core tensor \(\mathcal{G} \in \Re^{p \times q \times r}\), and multiple factor matrices \(A \in \Re^{I \times p}\), \(B \in \Re^{J \times q}\), and \(C \in \Re^{K \times r}\) (\(p \leq I, q \leq J, \textrm{and}\ r \leq K\)).

\[ \mathcal{X} = \mathcal{G} \times_{1} A \times_{2} B \times_{3} C \]

For simplicity, here we will use a third-order tensor but the Tucker decomposition can be applied to tensors of larger orders.

There are well-known two algorithms; Higher-Order Singular Value Decomposition (HOSVD) and Higher-order Orthogonal Iteration (HOOI).

`hosvd` performs the HOSVD Tucker decomposition and `tucker` performs HOOI Tucker decomposition.

For the details, check the `hosvd` and `tucker` functions of rTensor.

    out_hosvd <- hosvd(darr, ranks=c(2,1,3))

    ##   |                                                                              |                                                                      |   0%  |                                                                              |=======================                                               |  33%  |                                                                              |===============================================                       |  67%  |                                                                              |======================================================================| 100%

    str(out_hosvd)

    ## List of 4
    ##  $ Z          :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a3a520d9.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO00125"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 2 1 3
    ##   .. .. .. ..@ chunkdim : int [1:3] 2 1 3
    ##   .. .. .. ..@ first_val: num -3.62
    ##  $ U          :List of 3
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:3, 1:2] -0.606 -0.649 -0.459 0.529 0.102 ...
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:4, 1] -0.412 -0.598 -0.428 -0.538
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:5, 1:3] -0.47 -0.45 -0.444 -0.531 -0.312 ...
    ##  $ est        :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a52fc13ae.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO00142"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 3 4 5
    ##   .. .. .. ..@ chunkdim : int [1:3] 3 4 5
    ##   .. .. .. ..@ first_val: num 0.412
    ##  $ fnorm_resid: num 2.13

    out_tucker <- tucker(darr, ranks=c(2,3,2))

    ##   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |======                                                                |   8%  |                                                                              |========                                                              |  12%  |                                                                              |======================================================================| 100%

    str(out_tucker)

    ## List of 7
    ##  $ Z           :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a653fcac9.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO00320"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 2 3 2
    ##   .. .. .. ..@ chunkdim : int [1:3] 2 3 2
    ##   .. .. .. ..@ first_val: num 3.62
    ##  $ U           :List of 3
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:3, 1:2] -0.6164 -0.6443 -0.4527 0.584 0.0116 ...
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:4, 1:3] -0.392 -0.595 -0.438 -0.548 0.342 ...
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:5, 1:2] 0.471 0.453 0.443 0.531 0.308 ...
    ##  $ conv        : logi TRUE
    ##  $ est         :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a11a0a3d6.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO00354"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 3 4 5
    ##   .. .. .. ..@ chunkdim : int [1:3] 3 4 5
    ##   .. .. .. ..@ first_val: num 0.218
    ##  $ norm_percent: num 66.9
    ##  $ fnorm_resid : num 1.4
    ##  $ all_resids  : num [1:3] 1.41 1.4 1.4

## CANDECOMP/PARAFAC (CP) Decomposition

Suppose a tensor \(\mathcal{X} \in \Re^{I \times J \times K}\). CP decomposition models decomposes a tensor \(X\) into a core diagonal tensor \(\mathcal{G} \in \Re^{r \times r \times r}\), and multiple factor matrices \(A \in \Re^{I \times r}\), \(B \in \Re^{J \times r}\), and \(C \in \Re^{K \times r}\) (\(r \leq \min{\left(I,J,K\right)}\)).

\[ \mathcal{X} = \mathcal{G} \times_{1} A \times_{2} B \times_{3} C \]

For simplicity, here we will use a third-order tensor but the CP decomposition can be applied to tensors of larger orders.

Alternating least squares (ALS) is a well-known algorithm for CP decomposition and `cp` performs the ALS CP decomposition.

For the details, check the `cp` function of rTensor.

    out_cp <- cp(darr, num_components=2)

    ##   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |======                                                                |   8%  |                                                                              |========                                                              |  12%  |                                                                              |===========                                                           |  16%  |                                                                              |==============                                                        |  20%  |                                                                              |=================                                                     |  24%  |                                                                              |====================                                                  |  28%  |                                                                              |======================                                                |  32%  |                                                                              |=========================                                             |  36%  |                                                                              |============================                                          |  40%  |                                                                              |===============================                                       |  44%  |                                                                              |==================================                                    |  48%  |                                                                              |====================================                                  |  52%  |                                                                              |=======================================                               |  56%  |                                                                              |==========================================                            |  60%  |                                                                              |=============================================                         |  64%  |                                                                              |================================================                      |  68%  |                                                                              |==================================================                    |  72%  |                                                                              |=====================================================                 |  76%  |                                                                              |========================================================              |  80%  |                                                                              |===========================================================           |  84%  |                                                                              |======================================================================| 100%

    str(out_cp)

    ## List of 7
    ##  $ lambdas     : num [1:2] 11.7 17.9
    ##  $ U           :List of 3
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. ..@ seed:Formal class 'DelayedUnaryIsoOpWithArgs' [package "DelayedArray"] with 6 slots
    ##   .. .. .. .. .. .. ..@ OP    :function (e1, e2)
    ##   .. .. .. .. .. .. ..@ Largs : list()
    ##   .. .. .. .. .. .. ..@ Rargs :List of 1
    ##   .. .. .. .. .. .. .. ..$ : num [1:2] 11.6 17.9
    ##   .. .. .. .. .. .. ..@ Lalong: int(0)
    ##   .. .. .. .. .. .. ..@ Ralong: int 1
    ##   .. .. .. .. .. .. ..@ seed  :Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. .. .. .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. .. .. .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a59fa07bc.h5"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01746"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. .. .. .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. .. .. .. .. .. .. ..@ dim      : int [1:2] 3 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ chunkdim : int [1:2] 3 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ first_val: num 6.67
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. ..@ seed:Formal class 'DelayedUnaryIsoOpWithArgs' [package "DelayedArray"] with 6 slots
    ##   .. .. .. .. .. .. ..@ OP    :function (e1, e2)
    ##   .. .. .. .. .. .. ..@ Largs : list()
    ##   .. .. .. .. .. .. ..@ Rargs :List of 1
    ##   .. .. .. .. .. .. .. ..$ : num [1:2] 11.7 17.9
    ##   .. .. .. .. .. .. ..@ Lalong: int(0)
    ##   .. .. .. .. .. .. ..@ Ralong: int 1
    ##   .. .. .. .. .. .. ..@ seed  :Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. .. .. .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. .. .. .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a4e707c38.h5"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01769"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. .. .. .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. .. .. .. .. .. .. ..@ dim      : int [1:2] 4 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ chunkdim : int [1:2] 4 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ first_val: num 0.783
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. ..@ seed:Formal class 'DelayedUnaryIsoOpWithArgs' [package "DelayedArray"] with 6 slots
    ##   .. .. .. .. .. .. ..@ OP    :function (e1, e2)
    ##   .. .. .. .. .. .. ..@ Largs : list()
    ##   .. .. .. .. .. .. ..@ Rargs :List of 1
    ##   .. .. .. .. .. .. .. ..$ : num [1:2] 11.7 17.9
    ##   .. .. .. .. .. .. ..@ Lalong: int(0)
    ##   .. .. .. .. .. .. ..@ Ralong: int 1
    ##   .. .. .. .. .. .. ..@ seed  :Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. .. .. .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. .. .. .. .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. .. .. .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a4d5c394a.h5"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01792"
    ##   .. .. .. .. .. .. .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. .. .. .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. .. .. .. .. .. .. ..@ dim      : int [1:2] 5 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ chunkdim : int [1:2] 5 2
    ##   .. .. .. .. .. .. .. .. .. .. ..@ first_val: num 2.94
    ##  $ conv        : logi TRUE
    ##  $ est         :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a3b47bc26.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01809"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 3 4 5
    ##   .. .. .. ..@ chunkdim : int [1:3] 3 4 5
    ##   .. .. .. ..@ first_val: num 0.308
    ##  $ norm_percent: num 63.4
    ##  $ fnorm_resid : num 1.55
    ##  $ all_resids  : num [1:21] 3.11 2 1.8 1.74 1.7 ...

## Multilinear Principal Component Analysis (MPCA)

MPCA is a kind of Tucker decomposition and when the order of tensor is 3, this is also known as the Generalized Low-Rank Approximation of Matrices (GLRAM). For the details, check the `mpca` function of rTensor.

    out_mpca <- mpca(darr, ranks=c(2,2))

    ##   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |======                                                                |   8%  |                                                                              |======================================================================| 100%

    str(out_mpca)

    ## List of 7
    ##  $ Z_ext       :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a32d985b0.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01879"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 2 2 5
    ##   .. .. .. ..@ chunkdim : int [1:3] 2 2 5
    ##   .. .. .. ..@ first_val: num 1.73
    ##  $ U           :List of 3
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:3, 1:2] -0.6145 -0.6332 -0.4706 0.6206 -0.0198 ...
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed: num [1:4, 1:2] -0.404 -0.591 -0.431 -0.55 0.329 ...
    ##   ..$ : NULL
    ##  $ conv        : logi TRUE
    ##  $ est         :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a34d7fa5d.h5"
    ##   .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01901"
    ##   .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. ..@ type     : chr NA
    ##   .. .. .. ..@ dim      : int [1:3] 3 4 5
    ##   .. .. .. ..@ chunkdim : int [1:3] 3 4 5
    ##   .. .. .. ..@ first_val: num 0.182
    ##  $ norm_percent: num 65.8
    ##  $ fnorm_resid : num 1.45
    ##  $ all_resids  : num [1:2] 1.45 1.45

## Population Value Decomposition (PVD)

Suppose a series of 2D data X_{j}, where \(X_{j} \in \Re^{n_{1} \times n_{2}}\), and \(j = 1, \ldots , n_{3}\). PVD models decomposes a tensor \(X_{j}\) into two common factor matrices across all \(X_{j}\), \(P \in \Re^{n_{1} \times r_{1}}\) and \(D \in \Re^{n_{2} \times r_{2}}\), and a \(X_{j}\) specific factor matrix \(V_{j} \in \Re^{r_{1} \times r_{2}}\) (\(r_{1} \leq n_{1}, \textrm{and}\ r_{2} \leq n_{2}\)).

\[ X_{j} = P \times V_{j} \times D \]

For the details, check the `pvd` function of rTensor.

    out_pvd <- pvd(darr,
      uranks=rep(2,dim(darr)[3]), wranks=rep(3,dim(darr)[3]), a=2, b=3)

    ##   |                                                                              |                                                                      |   0%  |                                                                              |=========                                                             |  12%  |                                                                              |==================                                                    |  25%  |                                                                              |==========================                                            |  38%  |                                                                              |===================================                                   |  50%  |                                                                              |============================================                          |  62%  |                                                                              |====================================================                  |  75%  |                                                                              |=============================================================         |  88%  |                                                                              |======================================================================| 100%

    str(out_pvd)

    ## List of 6
    ##  $ P           :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed: num [1:3, 1:2] 0.0826 0.3101 0.9471 0.7364 0.6214 ...
    ##  $ D           :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'DelayedAperm' [package "DelayedArray"] with 2 slots
    ##   .. .. .. ..@ perm: int [1:2] 2 1
    ##   .. .. .. ..@ seed: num [1:4, 1:3] 0.476 0.199 0.605 0.607 -0.371 ...
    ##  $ V           :List of 5
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a731406e2.h5"
    ##   .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01935"
    ##   .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. ..@ dim      : int [1:2] 2 3
    ##   .. .. .. .. ..@ chunkdim : int [1:2] 2 3
    ##   .. .. .. .. ..@ first_val: num 1.29
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a16baf4cc.h5"
    ##   .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01941"
    ##   .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. ..@ dim      : int [1:2] 2 3
    ##   .. .. .. .. ..@ chunkdim : int [1:2] 2 3
    ##   .. .. .. .. ..@ first_val: num 1.58
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a346093a4.h5"
    ##   .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01947"
    ##   .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. ..@ dim      : int [1:2] 2 3
    ##   .. .. .. .. ..@ chunkdim : int [1:2] 2 3
    ##   .. .. .. .. ..@ first_val: num 1.1
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a1211e5bc.h5"
    ##   .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01953"
    ##   .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. ..@ dim      : int [1:2] 2 3
    ##   .. .. .. .. ..@ chunkdim : int [1:2] 2 3
    ##   .. .. .. .. ..@ first_val: num 0.965
    ##   ..$ :Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
    ##   .. .. ..@ seed:Formal class 'HDF5ArraySeed' [package "HDF5Array"] with 7 slots
    ##   .. .. .. .. ..@ filepath : chr "/tmp/Rtmpbj1kgR/auto114a5a0cfc9d.h5"
    ##   .. .. .. .. ..@ name     : chr "/HDF5ArrayAUTO01959"
    ##   .. .. .. .. ..@ as_sparse: logi FALSE
    ##   .. .. .. .. ..@ type     : chr NA
    ##   .. .. .. .. ..@ dim      : int [1:2] 2 3
    ##   .. .. .. .. ..@ chunkdim : int [1:2] 2 3
    ##   .. .. .. .. ..@ first_val: num 0.853
    ##  $ est         :Formal class 'DelayedArray' [package "DelayedArray"] with 1 slot
    ##   .. ..@ seed: num [1:3, 1:4, 1:5] 0.201 0.277 0.363 0.694 0.775 ...
    ##  $ norm_percent: num 63.7
    ##  $ fnorm_resid : num 1.54

# Session information

    ## R version 4.5.1 (2025-06-13)
    ## Platform: x86_64-pc-linux-gnu
    ## Running under: Ubuntu 24.04.3 LTS
    ##
    ## Matrix products: default
    ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
    ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
    ##
    ## locale:
    ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
    ##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C
    ##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
    ##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
    ##  [9] LC_ADDRESS=C               LC_TELEPHONE=C
    ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
    ##
    ## time zone: Etc/UTC
    ## tzcode source: system (glibc)
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] DelayedRandomArray_1.17.0 HDF5Array_1.37.0
    ##  [3] h5mread_1.1.1             rhdf5_2.55.4
    ##  [5] DelayedArray_0.37.0       SparseArray_1.11.1
    ##  [7] S4Arrays_1.11.0           abind_1.4-8
    ##  [9] IRanges_2.45.0            S4Vectors_0.49.0
    ## [11] MatrixGenerics_1.23.0     matrixStats_1.5.0
    ## [13] BiocGenerics_0.57.0       generics_0.1.4
    ## [15] Matrix_1.7-4              DelayedTensor_1.17.0
    ## [17] BiocStyle_2.39.0
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] dqrng_0.4.1         sass_0.4.10         lattice_0.22-7
    ##  [4] digest_0.6.37       evaluate_1.0.5      grid_4.5.1
    ##  [7] fastmap_1.2.0       jsonlite_2.0.0      BiocManager_1.30.26
    ## [10] codetools_0.2-20    jquerylib_0.1.4     cli_3.6.5
    ## [13] rlang_1.1.6         XVector_0.51.0      cachem_1.1.0
    ## [16] yaml_2.3.10         tools_4.5.1         beachmat_2.25.5
    ## [19] parallel_4.5.1      BiocParallel_1.45.0 einsum_0.1.2
    ## [22] Rhdf5lib_1.33.0     rsvd_1.0.5          buildtools_1.0.0
    ## [25] R6_2.6.1            lifecycle_1.0.4     BiocSingular_1.25.1
    ## [28] irlba_2.3.5.1       ScaledMatrix_1.19.0 rTensor_1.4.9
    ## [31] bslib_0.9.0         Rcpp_1.1.0          xfun_0.54
    ## [34] sys_3.4.3           knitr_1.50          rhdf5filters_1.23.0
    ## [37] htmltools_0.5.8.1   rmarkdown_2.30      maketools_1.3.2
    ## [40] compiler_4.5.1