This function adds the best pair of basis functions to the model
AddBF(data, x, y, ForwardModel, knots_list, Kp, minspan, Le, linpreds, err_min)A list containing the matrix of basis functions (B), a
list of basis functions (BF), a list of selected knots
(knots_list) and the minimum error (err_min).
data data.frame or matrix containing the variables
in the model.
Column input indexes in data.
Column output indexes in data.
list containing the set of basis functions and the
B matrix.
list containing the set of selected knots.
Maximum degree of interaction allowed.
integer. Minimum number of observations between knots.
When minspan = 0, it is calculated as in Friedman's MARS paper section
3.8 with alpha = 0.05.
integer Minimum number of observations before the first and
after the final knot.
logical. If TRUE, predictors can enter linearly
Minimum error in the split.