You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently been working with mboost, especially gamboost, for the first time. For a deeper understanding of how the algorithm works, I calculated the first iterations of a basic example manually using categorical data and only a single linear base learner. There were some differences between the coefficients I calculated and the ones mboost provides. It seems like mboost provides the „bare“ coefficients and replaces the base level coefficient with zero. I was expecting all coefficients to be corrected in perspective to the base level. Here is short example:
`library(mboost)
x<-as.factor(mtcars$carb)
y<-mtcars$mpg*10
GAM<-gamboost(y~bols(x, intercept = FALSE), family = Poisson())
I have recently been working with mboost, especially gamboost, for the first time. For a deeper understanding of how the algorithm works, I calculated the first iterations of a basic example manually using categorical data and only a single linear base learner. There were some differences between the coefficients I calculated and the ones mboost provides. It seems like mboost provides the „bare“ coefficients and replaces the base level coefficient with zero. I was expecting all coefficients to be corrected in perspective to the base level. Here is short example:
`library(mboost)
x<-as.factor(mtcars$carb)
y<-mtcars$mpg*10
GAM<-gamboost(y~bols(x, intercept = FALSE), family = Poisson())
coef(GAM[1])
nu<-0.1
OffsetWert<-log(mean(y), base = exp(1))
negGradient<-y-exp(OffsetWert)
mtcars_neu<-data.frame(mtcars, negGradient)
Koef_mtcars<-aggregate(mtcars_neu$negGradient, list(mtcars_neu$carb), mean)
#The coefficients mboost provides seem to be the following:
Koef_mtcars$x*nu
#I was expecting the standardized coefficients to be as follow:
#I use subtraction instead of division because we're using a loglink function
Umnormierte_Koef<-(Koef_mtcars$x-Koef_mtcars$x[1])*nu
Umnormierte_Koef`
I would be happy about any help or hints to solve the problem!
The text was updated successfully, but these errors were encountered: