xgboost icon indicating copy to clipboard operation
xgboost copied to clipboard

support DART - new regularization = dropout trees during learning

Open gugatr0n1c opened this issue 10 years ago • 24 comments

There is nice article about dropout from neural nets, applied to gradient boosting:

http://arxiv.org/pdf/1505.01866.pdf

It is about drop out some trees during learning process and rescale weight of trees because of that... It can help to accuracy...

Thanx for consideration...

gugatr0n1c avatar Feb 07 '16 16:02 gugatr0n1c

This should not be too hard to add by adding a new gradient booster, or extending current gbtree.

tqchen avatar Feb 10 '16 19:02 tqchen

I would suggest:

  • extending gbtree
  • new parameter 'dart_dropout', 'dart_p' or something in that direction (float, range [0,1], default: 0)

thoughts?

Far0n avatar Mar 08 '16 13:03 Far0n

I've created a prototype.(not tested yet) https://github.com/marugari/xgboost/tree/prototype_dart

marugari avatar Apr 17 '16 07:04 marugari

@marugari It would be great if you can run some benchmarks and see the performance, we can look into bring it back to main repo

tqchen avatar Apr 17 '16 17:04 tqchen

it improves performance slightly. https://github.com/marugari/xgboost/tree/prototype_dart/tests/dart

marugari avatar Apr 20 '16 15:04 marugari

This sounds interesting. @marugari Can we also refactored the code a bit?

Since I guess most part of dart could reuse the code of GBTree, and only prediction function needs to be replace. Let us consider use inheritance or a common base code, so the code is cleaner and easier to maintain.

Then I am happy to take a review and bring it to xgboost main repo

tqchen avatar Apr 20 '16 16:04 tqchen

@tqchen Sure. I also think Dart shold inherit from GBTree but could not fix duplicate symbols. :cry:

marugari avatar Apr 20 '16 20:04 marugari

If there is not too much code, we can put two classes both in gbm.cc which should solve the problem

tqchen avatar Apr 20 '16 20:04 tqchen

@tqchen If it is agreeable, I can refact the code. The following methods are defined in Dart.

  • Configure
  • Load
  • Save
  • DoBoost
  • Predict
  • CommitModel
  • Pred
  • DropTrees
  • NormalizeTrees

marugari avatar Apr 20 '16 21:04 marugari

Sounds good.

tqchen avatar Apr 20 '16 21:04 tqchen

How's this? https://github.com/marugari/xgboost/commit/d4e3a6b4cee1259be5245ea78ad601aef6b3ca2a

marugari avatar Apr 23 '16 09:04 marugari

great work @marugari. thank you for bringing DART in.

Far0n avatar Apr 23 '16 10:04 Far0n

@marugari This looks good, can you

  • rebase your commits so the history of the old dart.cc is removed, another simpler way might be start from a clean fork
  • Add a few comments on what dart is, and the algorithms
  • Open a pull request and I will do more detailed code review in the PR
  • It is likely that you can reuse a few functions, like SaveModel, or change the parent function to isolate the common parts and further reduce the code.
  • To prevent the codebase from getting too large, let us avoid ipynb in the main repo. Use markdown and python scripts instead. You can always put ipynb to https://github.com/dmlc/web-data
  • Please write an markdown introduction in documents on how dart can be used.

Thanks for the great effort

tqchen avatar Apr 23 '16 23:04 tqchen

It has been merged. https://github.com/dmlc/xgboost/commit/949d1e3027727c3238e90de0cc35a666c64fb728

The tutorial is under construction. https://github.com/marugari/xgboost/blob/prototype_dart/doc/tutorials/dart.md

marugari avatar Jun 12 '16 10:06 marugari

great:)

tqchen avatar Jun 12 '16 17:06 tqchen

@marugari any updates on english version of guest blogpost?

tqchen avatar Jun 24 '16 03:06 tqchen

Updated. https://github.com/marugari/xgboost/blob/prototype_dart/doc/tutorials/dart.md

marugari avatar Jun 25 '16 11:06 marugari

looks nice,

  • it would be great if you add a few brief sentences to describe DART (like abstract in publication) in the intro.
  • Please send the PR to the dmlc blog
    • Reference format of other posts to add tags
    • https://github.com/dmlc/dmlc.github.io/tree/master/_posts
    • Add bio of yourself in the end
    • Add reference link to xgboost in the posts
    • Add a reference to your japanese version of blog
  • Separately, let us send the same post to https://github.com/dmlc/xgboost/tree/master/doc/tutorials

tqchen avatar Jun 25 '16 16:06 tqchen

Can I use MathJax in dmlc.github.io?

marugari avatar Jun 27 '16 12:06 marugari

seems not, maybe use images for formula for safety

tqchen avatar Jun 27 '16 17:06 tqchen