Can anyone help give a conceptual explanation to how predictions are made for new data when using smooths /splines for a predictive model? For example, given a model created using
gamboost in the
mboost package in R, with p-splines, how are predictions for new data made? What is used from the training data?
Say that there is a new value of the independent variable x and we want to predict y. Is a formula for spline creation applied to this new data value using the knots or df used when training the model and then the coefficients from the trained model are applied to output the prediction?
Here is an example with R, what is predict doing conceptually to output 899.4139 for the new data mean_radius = 15.99?
#take the data wpbc as example library(mboost) data(wpbc) modNew<-gamboost(mean_area~mean_radius, data = wpbc, baselearner = "bbs", dfbase = 4, family=Gaussian(),control = boost_control(mstop = 5)) test<-data.frame(mean_radius=15.99) predict(modNew,test)