gamboostpairs
statistics: S = gamboostpairs (X, R)
Score every pair of predictors for an interaction.
S = gamboostpairs (X, R) lays the residuals R
of a fitted additive model on the coarse grid of each pair of columns of
X and returns the two-way analysis of variance F ratio testing
what only the cells explain. It is used to rank candidate interactions for
ClassificationGAM and RegressionGAM, and it is not meant to be
called directly.
The p-values are deliberately not computed here. Turning F
into a probability needs fcdf, which the package already ships and
which is verified against MATLAB, so the caller applies it rather than a
second implementation being carried in the compiled engine. Which pairs to
keep is policy and belongs beside that.
S is a structure with the following fields, one row per pair, ordered
as nchoosek orders them.
Pairs, the Mx2 matrix of predictor index pairs.
F, the Mx1 vector of F ratios. A pair with too
few observations, no spare degrees of freedom or no within-cell scatter
scores 0.
DF1 and DF2, the Mx1 numerator and denominator
degrees of freedom.
BinEdges, a 1xP cell of the coarse cut points each
predictor was laid on. The grid is fixed at eight equal-frequency bins,
which is what MATLAB reports for pair detection at every sample size.
See also: gamboosttrain, gamboostpredict, fcdf, ClassificationGAM
Source Code: gamboostpairs