Categories &

Functions List

Function Reference: gamboostinter

statistics: Mdl = gamboostinter (X, Y, F0, Method, Pairs, NumTrees, LearnRate, MaxNumSplits)

statistics: Mdl = gamboostinter (…, W)

statistics: Mdl = gamboostinter (…, W, Categorical)

Boost trees over selected pairs of predictors.

Mdl = gamboostinter (…) fits the interaction phase of a generalized additive model, continuing from the additive prediction the predictor phase left rather than refitting it. It is used by ClassificationGAM and RegressionGAM, and it is not meant to be called directly.

  • X is an NxP numeric matrix of predictors and Y the Nx1 response, as gamboosttrain takes them.
  • F0 is the Nx1 additive prediction of the predictor phase. The interaction phase starts from it, so its deviance is where this phase begins.
  • Method selects what is boosted, 1 the logistic deviance and 2 the squared error.
  • Pairs is an Mx2 matrix of predictor index pairs, one-based and within range. Choosing them is the caller’s business; see gamboostpairs.
  • NumTrees, LearnRate and MaxNumSplits are the interaction phase’s own budget, initial step and split limit.
  • W, if given, is an Nx1 vector of non-negative observation weights, as gamboosttrain takes them, and may be empty.
  • Categorical, if given, flags the columns holding level codes, as gamboosttrain takes it. A pair tree splits such a predictor into two sets of levels, and its grid holds every level.

Mdl is a structure with the following fields.

  • PairBinEdges, a 1xP cell of the detection grid, eight equal-frequency bins per predictor, as MATLAB reports it.
  • PairEdges, a 1xM cell with one element per pair, a 1x2 cell of the cut points its trees used on its two predictors. A tree is fitted to the rows, cutting halfway between two values a node holds, keeping at least five rows in a leaf and growing a layer at a time within MaxNumSplits. A categorical predictor is cut into two sets of levels after sorting them by the step each would take alone; of cuts with equal gain the first in that order is kept, and a level none of a node’s rows holds stops at that node. A tree that splits on only one of the pair’s predictors is a main effect and adds nothing, so a round may leave a pair untouched.
  • PairValues, a 1xM cell of matrices, one value per cell of the pair’s own grid.
  • PairMissing, a 1xM cell, one element per pair: a 1x3 cell of what a row missing the first predictor takes, one value per cell of the second; what a row missing the second takes, one value per cell of the first; and what a row missing both takes. A row missing the predictor a node splits on stops there, in training as in prediction.
  • Intercept, the constant the recentred surfaces gave up. Add it to the intercept of the predictor phase.
  • NumTrees, ReasonForTermination, Deviance and Residuals, as gamboosttrain reports them.

See also: gamboosttrain, gamboostpairs, gamboostpredict

Source Code: gamboostinter