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
8
votes
1 answer

Caret classification thresholds

I have been using a gbm in the caret package in Rstudioto find the probability for the occurrence of a failure. I have used Youden's J to find a threshold for the best classification, which is 0.63. How do I now use this threshold? I presume the…
SB21
  • 95
  • 1
  • 7
7
votes
1 answer

Parameter Tuning using gridsearchcv for gradientboosting classifier in python

I am trying to run GradientBoostingClassifier() with the help of gridsearchcv. For every combination of parameter, I also need "Precison", "recall" and accuracy in tabular format. Here is the code: scoring= ['accuracy',…
MAC
  • 1,345
  • 2
  • 30
  • 60
7
votes
1 answer

gbm in R crashes

I tried to use gbm(formula, data) in Rstudio on my dataset. But Rstudio crashes on windows and Mac without any message (just " Rstudio needs to restart"). Any idea how I can fix this issue? thanks
user2327621
  • 957
  • 3
  • 11
  • 15
6
votes
1 answer

Implement null distribution for gbm interaction strength

I am trying to determine which interactions in a gbm model are significant using the method described in Friedman and Popescu 2008 https://projecteuclid.org/euclid.aoas/1223908046. My gbm is a classification model with 9 different classes. I'm…
see24
  • 1,097
  • 10
  • 21
6
votes
1 answer

Caret xgbLinear and xgbTree

I am using these two derivates of GBM on Caret. I tried both algo on the same dataset and they return different accuracy and perform in different time. By the name, I can think that the first use a Linear function somewhere, and the other use…
youngz
  • 179
  • 2
  • 16
6
votes
3 answers

Caret error using GBM, but not without caret

I've been using gbm through caret without problems, but when removing some variables from my dataframe it started to fail. I've tried with both github and cran versions of the mentioned packages. This is the error: > fitRF =…
Alejandro Pulver
  • 555
  • 4
  • 13
6
votes
1 answer

Error in R gbm function when cv.folds > 0

I am using gbm to predict binary response. When I set cv.folds=0, everything works well. However when cv.folds > 1, I got error:Error in object$var.levels[[i]] : subscript out of bounds when the first irritation of crossvalidation finished. Someone…
Yoki
  • 863
  • 4
  • 14
  • 26
6
votes
1 answer

Difference in memory usage between gbm and blackboost

I'm working on a database with around 250000 observation and 50 predictors (some are factors so in the end around 100 features) and I have trouble using the blackboost() function (from mboost package) which give me a memory allocation error. In the…
Alex
  • 351
  • 1
  • 12
5
votes
1 answer

Negative SHAP values in H2O in Python using predict_contributions

I have been trying to compute SHAP values for a Gradient Boosting Classifier in H2O module in Python. Below there is the adapted example in the documentation for the predict_contibutions method (adapted from…
jessicalfr
  • 69
  • 6
5
votes
0 answers

Inconsistent predictions from predict.gbm() 2.1.4 vs 2.1.3

This question is related to my earlier post here. I have tracked down the problem and it seems to be related to which version of gbm I use. The latest version, 2.1.4 exhibits the problem on my system (R 3.4.4 and also 3.5; both on Ubuntu 18.04)…
Robert Long
  • 5,722
  • 5
  • 29
  • 50
5
votes
1 answer

How to set 'gain' as Feature Importance measure in feature_importances_ for LightGBM classifer in sklearn:: LGBMClassifier()

I am building a binary classifier model using LGBMClassifer in LightGBM, similar like below : # LightGBM model clf = LGBMClassifier( nthread=4, n_estimators=10000, learning_rate=0.005, …
Ravijeet
  • 133
  • 1
  • 2
  • 11
5
votes
1 answer

How to suppress iteration output from Boosted tree model gbm in Caret from R studio

If I run this code tot train a gbm-model with Knitr, I receive several pages of Iter output like copied below. Is there a method to suppress this output? mod_gbm <- train(classe ~ ., data = TrainSet, method = "gbm") ## Iter TrainDeviance …
user2165379
  • 445
  • 4
  • 20
5
votes
1 answer

Understanding tree structure in R gbm package

I am having some difficulty understanding how the trees are structured in R's gbm gradient boosted machine package. Specifically, looking at the output of the pretty.gbm.tree Which features do the indices in SplitVar point to? I trained a GBM on a…
bill_e
  • 930
  • 2
  • 12
  • 24
5
votes
1 answer

Weights argument in R gbm function

What is the weights argument for in the R gbm function? Does it implement cost-sensitive stochastic gradient boosting?
Antoine
  • 1,649
  • 4
  • 23
  • 50
5
votes
0 answers

gbm confidence intervals in R?

Anybody know how to calculate confidence intervals from the gbm.predict() function? I'd like a method to ascertain a 95% confidence band on my gbm predictions.
1
2
3
21 22