New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glmboost issue with verboseIter and parameters #396
Comments
It isn't alarming that the verbose logging didn't print out every model; use use something called the sub-model trick here. If you want to evaluate models with 10, 50, and 100 boosting iterations we don't have to fit all three models (only the last one). This can save a ton of time tuning the model. Also:
However, there was a bug here. The > cars.gb <- glmboost(dist ~ speed, data = cars,
+ control = boost_control(mstop = 2000),
+ center = FALSE)
> cars.gb
Generalized Linear Models Fitted via Gradient Boosting
Call:
glmboost.formula(formula = dist ~ speed, data = cars, center = FALSE, control = boost_control(mstop = 2000))
Squared Error (Regression)
Loss function: (y - f)^2
Number of boosting iterations: mstop = 2000
Step size: 0.1
Offset: 42.98
Coefficients:
(Intercept) speed
-60.331204 3.918359
attr(,"offset")
[1] 42.98
>
> ### initial number of boosting iterations
> mstop(cars.gb)
[1] 2000
> ### look at the model after only 10 iterations:
> cars.gb[10]
Generalized Linear Models Fitted via Gradient Boosting
Call:
glmboost.formula(formula = dist ~ speed, data = cars, center = FALSE, control = boost_control(mstop = 2000))
Squared Error (Regression)
Loss function: (y - f)^2
Number of boosting iterations: mstop = 10
Step size: 0.1
Offset: 42.98
Coefficients:
(Intercept) speed
-0.6546347 0.2338597
attr(,"offset")
[1] 42.98
>
> mstop(cars.gb)
[1] 10 This is documented in
I made changes to this and |
update.packages(oldPkgs="caret", ask=FALSE)
sessionInfo()
Running the code below runs 2 models with glmboost. The only difference is the order of the parameter prune. In the first model the order is "yes" , "no", in the second model the other way around. The issue is that the training log only shows 3 folds, and only for mstop = 150 and the prune parameter specified as the first one. Selecting the tuning parameters it selects mstop = 100 and the pruning parameter specified as the first one. If you look at the prints of both models it looks like the same tuning parameters were chosen and the pruning parameter was ignored.
One other point is the use of the prune parameter. It looks like it has no effect. If that is the case, shouldn't it be removed as a parameter option?
Minimal, reproducible example:
Session Info:
The text was updated successfully, but these errors were encountered: