Clean nuisance regressors by dropping rank-useless columns
Source:R/baseline_model.R
clean_nuisance.RdDrops nuisance columns that are non-finite, zero-variance, or fail to increase QR rank after the block's baseline terms and earlier nuisance columns. Column order is respected, so when two columns are aliased the earlier column is kept.
Arguments
- nuisance_list
A list of numeric matrices or data frames, one per block.
- sframe
A sampling frame.
- basis, degree, intercept
Baseline model settings used to construct the comparison baseline terms.
- tol
Numeric tolerance passed to QR rank checks.
- duplicate_threshold
Absolute correlation threshold used to flag duplicate or near-duplicate columns.
Value
A list with nuisance_list and report elements. Pass
result$nuisance_list to baseline_model().