Skip to content

Instantly share code, notes, and snippets.

@yujingma45
Created March 22, 2016 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yujingma45/c3b58a9d54d45a55a9eb to your computer and use it in GitHub Desktop.
Save yujingma45/c3b58a9d54d45a55a9eb to your computer and use it in GitHub Desktop.
> 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