Learn R Programming

lgspline (version 0.2.0)

compute_GhalfXy_temp_wrapper: Compute Component \(\textbf{G}^{1/2}\textbf{A}(\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\textbf{G}\textbf{X}^{T}\textbf{y}\)

Description

Compute Component \(\textbf{G}^{1/2}\textbf{A}(\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\textbf{G}\textbf{X}^{T}\textbf{y}\)

Usage

compute_GhalfXy_temp_wrapper(
  G,
  Ghalf,
  A,
  AGAInv,
  Xy,
  nc,
  K,
  parallel,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks
)

Value

List containing:

  • Result vector

  • AGAInvAGXy intermediate product \((\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\textbf{G}\textbf{X}^{T}\textbf{y}\)

Arguments

G

List of \(\textbf{G}\) matrices

Ghalf

List of \(\textbf{G}^{1/2}\) matrices

A

Constraint matrix \(\textbf{A}\)

AGAInv

Inverse of \(\textbf{A}^{T}\textbf{G}\textbf{A}\)

Xy

List of \(\textbf{X}^{T}\textbf{y}\) products

nc

Number of columns

K

Number of partitions minus 1 (\(K\))

parallel

Use parallel processing

cl

Cluster object

chunk_size

Size of parallel chunks

num_chunks

Number of chunks

rem_chunks

Remaining chunks

Details

Computes \(\textbf{G}^{1/2}\textbf{A}(\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\textbf{G}\textbf{X}^{T}\textbf{y}\) efficiently in parallel chunks. Note: The description seems slightly off from the C++ helper functions called (e.g., `compute_AGXy`, `compute_result_blocks`). This computes a component needed for least-squares transformation involving \(\textbf{G}^{1/2}\). Returns both the result and intermediate \(\textbf{A}^{T}\textbf{G}\textbf{A})^{-1}\textbf{A}^{T}\textbf{G}\textbf{X}^{T}\textbf{y}\) product for reuse.