Questions tagged [gbm]

R package gbm, implementing Generalized Boosted Regression Models library.

R package gbm, implementing Generalized Boosted Regression Models library.

This package implements extensions to Freund and Schapire’s AdaBoost algorithm and Friedman’s gradient boosting machine.

Includes regression methods for least squares,absolute loss, t-distribution loss, quantile regression,logistic, multinomial logistic, Poisson, Cox proportional hazards partial likelihood, AdaBoost exponential loss, Huberized hinge loss, and Learning to Rank measures (LambdaMart).

Who's using gbm?

The gbm package is used in examples in Software for Data Analysis by John Chambers.

gbm is also used in Elements of Statistical Learning by Hastie, Tibshirani and Friedman.

Richard A. Berk also uses gbm in his book, Statistical Learning from a Regression Perspective.

Source: gradientboostedmodels

330 questions
3
votes
2 answers

ROC score in gbm package

I am having trouble calculating ROC score (AUC) using gbm package. I am working with boosted regression trees. The script I am running is: testing.tc5.lr005 <- gbm.step(data=ModelData, gbm.x = 3:4, gbm.y = 2, family = "gaussian", tree.complexity =…
Learner
  • 73
  • 3
  • 8
3
votes
1 answer

Partial Dependency plots and Gradient boosting (GBM package)

Is it possible to plot a partial dependency plot to display the class probability and estimate the effects of a predictor for a GBM model? Something similar to partialPlot from randomForest package. According to this article, a partial plot is…
Panos Kalatzantonakis
  • 12,525
  • 8
  • 64
  • 85
2
votes
2 answers

base_margin or init_score for catboost regressor

I would like to use a CatBoost regressor for insurance applications (Poisson objective). As I need to fix the exposure, how can I set the offset of log_exposure? When using xgboost I use "base_margin", while for lightgbm I use the "init_score"…
Giorgio Spedicato
  • 2,413
  • 3
  • 31
  • 45
2
votes
1 answer

How to get the data on the GBM model with H2o library

I am using GBM model, and I wanna compare to other machine learning methods. I run with 5 folds. As I knew, they will separate the data into 5 folds, and chose one of them for the testing and the others for training. How to get 5 folds data from gbm…
cnp
  • 339
  • 2
  • 11
2
votes
1 answer

Eliminate iteration information text in caret R

I am working on some ML algorithms on the classic Iris dataset. This is my code: library(tidyverse) library(caret) dataset <- iris tt_index <- createDataPartition(dataset$Sepal.Length, times = 1, p = 0.9, list = FALSE) train_set <-…
Alexis
  • 2,104
  • 2
  • 19
  • 40
2
votes
0 answers

Error in eval(parse()) - r unable to find argument input

I am very new to R, and this is my first time of encountering the eval() function. So I am trying to use the med and boot.med function from the following package: mma. I am using it to conduct mediation analysis. med and boot.med take in models such…
sky sky
  • 21
  • 2
2
votes
1 answer

Is there a way in R to determine which levels within the variables are most important in the GBM predictive model?

I constructed a predictive model using the GBM package in R. I have good results and I am able to see the feature importance list to see which variables are most important to the model. I am struggling with an editor's question asking for direction…
ClareFG
  • 65
  • 1
  • 11
2
votes
1 answer

Boosted regression trees - deviance values

I am fitting a BRT model using gbm package in R for the following model: height above ground ~ Age + season + habitat + timeofday The height above ground is a continuous variable, and so is timeofday. Season and habitat are binomial variables. I get…
JMarcelino
  • 904
  • 4
  • 13
  • 30
2
votes
1 answer

h2o MOJO prediction vs h2o.predict both different for GBM

I am getting different predictions for the same test data set from both h2o.predict and h2o.mojo_predict_df. When compared - roughtly 50% of records have same probabilities but 50% are different with some where probabilities change drastically …
Learner_seeker
  • 544
  • 1
  • 4
  • 21
2
votes
0 answers

Hyperparameters to make a CART / RF out of LightGBM

I want to use the LightGBM framework as a CART and a Random Forest. This should be easily achievable by choosing the right hyper parameters for the algorithm. I think that I should do the following: Random Forest: random_forest =…
MajinBoo
  • 307
  • 1
  • 2
  • 10
2
votes
0 answers

Is there a way to add methods to a function within an R package?

I am trying to use lime to add ML explanations in the output of a package I am developing. My solution uses a gradient boosting model from library gbm. This type of model is not supported by lime as is, so I would need to add a gbm method to…
paolo
  • 33
  • 5
2
votes
1 answer

Unable to reproduce H2O GBM predictions despite setting seed

I'm trying to run multiple H2O models on different response variables in a for loop. H2O cluster uptime: 53 mins 11 secs H2O cluster timezone: Etc/UTC H2O data parsing timezone: UTC H2O cluster version: 3.22.1.1 H2O cluster…
J. Lee
  • 21
  • 2
2
votes
1 answer

error Predictor.new() function package IML in R

I am attempting to use package 'iml' in R to create plots of SHAP values from a GBM model created in H2O. When I try to create the R6 Predictor object using the Predictor.new() function I get an error that states Error : all(feature.class %in%…
Curtis
  • 449
  • 1
  • 4
  • 17
2
votes
0 answers

Problems in using GBM function to do classification in R

I was trying to do classification problem with gum function in R library(gbm) set.seed(1) boost.goodwine = gbm(goodwine~.-quality,data = traindata,shrinkage = 0.01, cv.folds = 5,distribution = 'bernoulli',n.trees = 3000,interaction.depth = 3) Here,…
2
votes
1 answer

Mean Residual Deviance Formula in H2O

I'm trying to find out the exact formula used in H2O for the Mean Residual Deviance loss function for a Tweedie distribution. Or even, in general, what would be the mean residual deviance for a Tweedie distributed dependent variable? So far, I've…
vosirus
  • 113
  • 1
  • 6