Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uprelative.influence gives different value when n.trees is given or not for multinomial distributions #31
Comments
|
@see24 Good catch, and thank you! I'll take a look at the PR this weekend! |
|
@bgreenwell The pull request looks good to me, for what it's worth. I'm not imaginative enough to think of a use case in which you'd not want to perform that multiplication, so the pull request as written seems as reasonable to me as the alternative of keeping relative.influence as-is but multiplying within summary.gbm. |
|
Thanks @cunningjames for the review. |
|
@bgreenwell Hey, no problem. The gargantuan effort it took for me to validate a three-line pull request won't be soon forgotten, though! |
I noticed that
relative.influenceandsummarygive different answers for the relative influence for multinomial distributions and when I looked a bit deeper I noticed thatrelative.influencegives a different result if it is called withn.treesspecified or the default which is to take theobject$n.treesThe problem is that in
relative.influenceit multipliesn.treesby the number of classes but this multiplication is incorrectly located inside theif(missing(n.trees))statement. Should be an easy fix but fairly important.