0
$\begingroup$

I would like to know which strategies are used in practice to choose the correct smoothing function for each features in the GAMs, both for classification and regression tasks. I thought of plotting a 2D graph and checking the trend of the distribution of the values ​​of a features with respect to the classes / numerical outputs (for regression) and on the basis of this choose whether to use an appropriate smoothing function or linear function.

$\endgroup$
8
  • $\begingroup$ The "G" stands for "Generalized" (with the same meaning as in GLM). Anyway, I'd recommend using mgcv:gam, which uses penalized regression splines (and can therefore reduce the smoothers' "wiggliness" to a linear relationship or even remove them). $\endgroup$ – Roland Aug 28 '20 at 6:10
  • $\begingroup$ Sisi excuse me, typing error. Thank you very much for your reply. So what you told me would be equivalent if using a P-Splines. However, I wanted a display method that would allow me to check in advance whether a Features has a linear distribution or not with respect to the class. That's why I thought I was viewing a 2D chart with all the values ​​of a Feature $\endgroup$ – Francesco Ladogana Aug 28 '20 at 7:12
  • $\begingroup$ That works as long as you have exactly one feature. $\endgroup$ – Roland Aug 28 '20 at 9:28
  • $\begingroup$ No obviously this has to be repeated for each input features. I do this reasoning because a Smoothing function is applied for each Fetures in the GAMs. Therefore the final model will be given by the additivity of these smoothing functions $\endgroup$ – Francesco Ladogana Aug 28 '20 at 9:33
  • $\begingroup$ Yes, but you can't inspect these smoothing functions without fitting the model and changing one of them also impacts the other ones. $\endgroup$ – Roland Aug 28 '20 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.