I use a 'carat' package in R to run a cross-verification for a normalized additive model (GAM) I am trying. I can get it to work for GLM, and it seems that it should be simple to run the same thing, but it can not be found to work, see below:
dat < - Data.frame (label = round (RPIIS (10020), v1 = rnorm (100), v2 = rnorm (100)) tc & lt; - trainControl ("cv", 10, savePred = T) (Fit & lt; - train (label ~., Data = data, method = "glm", trControl = tc, family = poisson (link = "log")) ) (Fit 1 & lt; - Train (label ~., Data = date, method = "gam", trControl = tc, family = poisson (link = "log"))
The important warning that was thrown during running the last line is:
20: in eval (expr, envir, enclos): failed to fit the model fit fold10: Select = FALSE, method = GCV.Cp error mgcv ::: gam (modForm, data = dat, family = dist, choose = choose the ultimate $, formal argument "family" matching with many real arguments It seems that someday the family's logic is not being sent to gam () in the same way that it is in Glam () to search the web. After that I have not found any examples of this work. Any help would be appreciated!
On further review, POSON results seemingly are not supported by any GAM-based model type in the carat
Not (at least in the documents, if not explicitly support these types of models) Carat codebase.
No comments:
Post a Comment