% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{compute_Lambda}
\alias{compute_Lambda}
\title{Construct Smoothing Spline Penalty Matrix}
\usage{
compute_Lambda(
  custom_penalty_mat,
  L1,
  wiggle_penalty,
  flat_ridge_penalty,
  K,
  p_expansions,
  unique_penalty_per_predictor,
  unique_penalty_per_partition,
  penalty_vec,
  colnm_expansions,
  just_Lambda = TRUE
)
}
\arguments{
\item{custom_penalty_mat}{Matrix; optional custom ridge penalty structure}

\item{L1}{Matrix; integrated squared second derivative penalty (\eqn{\textbf{L}_1})}

\item{wiggle_penalty, flat_ridge_penalty}{Numeric; smoothing and ridge penalty parameters}

\item{K}{Integer; number of interior knots (\eqn{K})}

\item{p_expansions}{Integer; number of basis columns per partition}

\item{unique_penalty_per_predictor, unique_penalty_per_partition}{Logical; enable predictor/partition-specific penalties}

\item{penalty_vec}{Named numeric; custom penalty values for predictors/partitions}

\item{colnm_expansions}{Character; column names for linking penalties to predictors}

\item{just_Lambda}{Logical; return only combined penalty matrix (\eqn{\boldsymbol{\Lambda}})}
}
\value{
List containing Lambda, L1, L2, L_predictor_list, L_partition_list;
  or just Lambda if \code{just_Lambda=TRUE} and no partition penalties.
}
\description{
Builds penalty matrix combining smoothing spline and ridge penalties with optional
predictor/partition-specific components.
}
\keyword{internal}
