pre_comput_WNN: pre_comput_WNN: Precompute quantities for SLGP basis...

View source: R/datamanagement.R

pre_comput_WNNR Documentation

pre_comput_WNN: Precompute quantities for SLGP basis evaluation with weighted nearest-neighbors

Description

Computes intermediate quantities for evaluating basis functions via weighted nearest-neighbor (WNN) interpolation on a discretized grid.

Usage

pre_comput_WNN(
  normalizedData,
  predictorNames,
  responseName,
  nIntegral = 101,
  nDiscret = 51
)

Arguments

normalizedData

Normalized data frame ([0,1]-scaled).

predictorNames

Character vector of covariate names.

responseName

Name of the response variable.

nIntegral

Number of quadrature points for response domain.

nDiscret

Number of discretization steps for covariates.

Value

A list of intermediate quantities:

  • nodes: all evaluation points in response × covariates grid,

  • indNodesToIntegral: indices to map nodes to response bins,

  • indSamplesToNodes: index mapping from samples to grid nodes,

  • weightSamplesToNodes: interpolation weights using inverse distance.


SLGP documentation built on Sept. 9, 2025, 5:25 p.m.