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
We actually lose performance by removing the weak learners! This demonstrates the power of stacking.
349
+
We actually lose ensemble performance by removing the weak learners! This demonstrates the power of stacking with a large and diverse set of base learners.
350
+
351
+
352
+
```r
353
+
>perf
354
+
355
+
Baselearnerperformance, sortedbyspecifiedmetric:
356
+
learnerAUC
357
+
1h2o.randomForest.10.7668024
358
+
2h2o.randomForest.20.7697849
359
+
3h2o.gbm.10.7751240
360
+
5h2o.gbm.80.7752852
361
+
4h2o.gbm.60.7771115
362
+
363
+
364
+
H2OEnsemblePerformanceon<newdata>:
365
+
----------------
366
+
Family:binomial
367
+
368
+
Ensemble performance (AUC):0.778853964308554
369
+
370
+
```
351
371
352
372
At first thought, you may assume that removing less performant models would increase the perforamnce of the ensemble. However, each learner has it's own unique contribution to the ensemble and the added diversity among learners usually improves performance. The Super Learner algorithm learns the optimal way of combining all these learners together in a way that is superior to other combination/blending methods.
353
373
@@ -372,8 +392,12 @@ family <- "binomial"
372
392
#For binary classification, response should be a factor
373
393
train[,y] <- as.factor(train[,y])
374
394
test[,y] <- as.factor(test[,y])
395
+
```
375
396
376
397
398
+
Cross-validate and train a handful of base learners and then use the `h2o.stack()` function to create the ensemble:
399
+
400
+
```r
377
401
# The h2o.stack function is an alternative to the h2o.ensemble function, which
378
402
# allows the user to specify H2O models individually and then stack them together
379
403
# at a later time. Saved models, re-loaded from disk, can also be stacked.
0 commit comments