pub fn functional_pdp(
fit: &FregreLmResult,
data: &FdMatrix,
_scalar_covariates: Option<&FdMatrix>,
component: usize,
n_grid: usize,
) -> Option<FunctionalPdpResult>Expand description
Functional PDP/ICE for a linear functional regression model.
Varies the FPC score for component across a grid while keeping other scores
fixed, producing ICE curves and their average (PDP).
For a linear model, ICE curves are parallel lines (same slope, different intercepts).
§Arguments
fit— A fittedFregreLmResultdata— Original functional predictor matrix (n × m)scalar_covariates— Optional scalar covariates (n × p)component— Which FPC component to vary (0-indexed, must be < fit.ncomp)n_grid— Number of grid points (must be ≥ 2)