Learn R Programming

lgspline (version 0.2.0)

compute_dG_dlambda: Compute Derivative of Penalty Matrix G with Respect to Lambda

Description

Calculates the derivative of the penalty matrix \(\textbf{G}\) with respect to the smoothing parameter lambda (\(\lambda\)), supporting both global and partition-specific penalties. This is related to the derivative of the diagonal weight matrix \(1/(1+\textbf{x}^{T}\textbf{U}\textbf{G}\textbf{x})\) w.r.t. the penalty.

Usage

compute_dG_dlambda(
  G,
  L,
  K,
  lambda,
  unique_penalty_per_partition,
  L_partition_list,
  parallel,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks
)

Value

A list of derivative matrices \(d\textbf{G}/d\lambda\) for each partition

Arguments

G

A list of penalty matrices \(\textbf{G}\) for each partition

L

The base penalty matrix \(\textbf{L}\)

K

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

lambda

Smoothing parameter value \(\lambda\)

unique_penalty_per_partition

Logical indicating partition-specific penalties

L_partition_list

Optional list of partition-specific penalty matrices \(\textbf{L}_k\)

parallel

Logical to enable parallel processing

cl

Cluster object for parallel computation

chunk_size

Size of chunks for parallel processing

num_chunks

Number of chunks

rem_chunks

Remainder chunks