Skip to content

Instantly share code, notes, and snippets.

@yujingma45

yujingma45/gbm.r

Created Mar 22, 2016
Embed
What would you like to do?
> depth=c(1,2,3,4,5)
> tuning.gbm(trn,depth,20,0.7)
[1] "=== cross validation error estimation ==="
[1] "depth= 1 : error= 12.2088907005888 +- 2.63624188615258"
[1] "depth= 2 : error= 9.99951434560433 +- 2.30181005481302"
[1] "depth= 3 : error= 9.39671136126591 +- 2.19944247921552"
[1] "depth= 4 : error= 9.14194019449996 +- 2.16337261929302"
[1] "depth= 5 : error= 8.97911772123462 +- 2.18464631653844"
[1] 5
> #normalized data
> tuning.gbm(ntrn,depth,20,0.7)
[1] "=== cross validation error estimation ==="
[1] "depth= 1 : error= 13.9370040081716 +- 3.04440240601424"
[1] "depth= 2 : error= 11.4634148778012 +- 2.57605950695619"
[1] "depth= 3 : error= 10.6968093959549 +- 2.5842720460932"
[1] "depth= 4 : error= 10.4965351284161 +- 2.70512669539836"
[1] "depth= 5 : error= 10.2043560393421 +- 2.72245106119603"
[1] 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment