问题 I would like to cross validate a GAM model using caret. My GAM model has a binary outcome variable, an isotropic smooth of latitude and longitude coordinate pairs, and then linear predictors. Typical syntax when using mgcv is: gam1 <- gam( y ~ s(lat , long) + x1 + x2, family = binomial(logit) ) I'm not quite sure how to specify this model using the train function in caret. This is my syntax more or less: cv <- train(y ~ lat + long + x1 + x2, data = data, method = "gam", family = "binomial",