1 of 75

Gradient Boosting Machines (GBM):

From Zero to Hero (with R and Python Code)

Szilard Pafka, PhD

Chief Scientist, Epoch

LA Data Science Meetup

Febr 2020

2 of 75

3 of 75

4 of 75

Disclaimer:

I am not representing my employer (Epoch) in this talk

I cannot confirm nor deny if Epoch is using any of the methods, tools, results etc. mentioned in this talk

5 of 75

Source: Andrew Ng

6 of 75

Source: Andrew Ng

7 of 75

Source: Andrew Ng

8 of 75

9 of 75

10 of 75

11 of 75

12 of 75

13 of 75

Source: https://twitter.com/iamdevloper/

14 of 75

15 of 75

16 of 75

...

17 of 75

18 of 75

19 of 75

20 of 75

21 of 75

22 of 75

23 of 75

y = f(x1,x2,...,xn)

“Learn” f from data

24 of 75

y = f(x1,x2,...,xn)

25 of 75

y = f(x1,x2,...,xn)

26 of 75

Supervised Learning

Data: X (n obs, p features), y (labels)

Regression, classification

Train/learn/fit f from data (model)

Score: for new x, get f(x)

Algos: LR, k-NN, DT, RF, GBM, NN/DL, SVM, NB…

Goal: max acc/min err new data

Metrics: MSE, AUC (ROC)

Bad: measure on train set. Need: test set/cross-validation (CV)

Hyperparameters, model capacity, overfitting

Regularization

Model selection

Hyperparameter search (grid, random)

Ensembles

27 of 75

Supervised Learning

Data: X (n obs, p features), y (labels)

Regression, classification

Train/learn/fit f from data (model)

Score: for new x, get f(x)

Algos: LR, k-NN, DT, RF, GBM, NN/DL, SVM, NB…

Goal: max acc/min err new data

Metrics: MSE, AUC (ROC)

Bad: measure on train set. Need: test set/cross-validation (CV)

Hyperparameters, model capacity, overfitting

Regularization

Model selection

Hyperparameter search (grid, random)

Ensembles

28 of 75

29 of 75

30 of 75

Source: Hastie etal, ESL 2ed

31 of 75

Source: Hastie etal, ESL 2ed

32 of 75

33 of 75

34 of 75

35 of 75

36 of 75

37 of 75

38 of 75

39 of 75

40 of 75

41 of 75

42 of 75

43 of 75

44 of 75

45 of 75

46 of 75

47 of 75

48 of 75

49 of 75

50 of 75

51 of 75

no-one is using

this crap

52 of 75

53 of 75

54 of 75

Live Demo

Summary of the demo for those reading just the slides (e.g. those who did not attend the talk):

55 of 75

56 of 75

57 of 75

58 of 75

59 of 75

60 of 75

61 of 75

62 of 75

63 of 75

64 of 75

65 of 75

66 of 75

67 of 75

68 of 75

http://www.jmlr.org/papers/volume13/bergstra12a/bergstra12a.pdf

69 of 75

End of Demo

70 of 75

71 of 75

72 of 75

73 of 75

74 of 75

75 of 75