Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2018-03-28 Thread Andreas Tille
Hi David,

thanks for your quick response.

I need to admit I'm lacking the background to understand your example
but I read your mail that you agree that version 2.1.1 is buggy.  The
bug does not contain any input data to reproduce the issue for version
2.1.3.  Would you be able to reproduce it or may be it is even fixed
in the latest version?  If not could you imagine a fix or do you think
it can be fixed in the upcoming gbm3?  If yes to the last question is
there any estimation when gbm3 will be available from CRAN?

Kind regards

  Andreas

On Tue, Mar 27, 2018 at 09:47:47AM -0700, David Paulsen wrote:
> Hello,
> 
> I clearly could have provided better documentation.
> 
> There was an issue I believe in the predict function when single.tree was
> set to TRUE.
> 
> The first 6 trees of the model are printed out to show the the first two
> trees for each of the three classes.
> 
> The first set of predictions are shown for using 1 and 2 trees.
> 
> The maths show that the manual addition of values from each of the trees
> match the first set of predictions.
> 
> The second set of predictions do not match the expected result from each
> tree.
> 
> Example:
> search document for 0.1126044 shows that the value of a two-tree prediction
> matches arithmetically, but the addend to 0.1126044 is not found in results
> for single.tree prediction.
> 
> search document for -0.04196866 shows that this value is found
> in predictions for two-tree sum and single.tree = TRUE result, and switches
> class position from prediction set 1 to prediction set1 (single.tree).
> 
> David

-- 
http://fam-tille.de

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2018-03-27 Thread David Paulsen
Hello,

I clearly could have provided better documentation.

There was an issue I believe in the predict function when single.tree was
set to TRUE.

The first 6 trees of the model are printed out to show the the first two
trees for each of the three classes.

The first set of predictions are shown for using 1 and 2 trees.

The maths show that the manual addition of values from each of the trees
match the first set of predictions.

The second set of predictions do not match the expected result from each
tree.

Example:
search document for 0.1126044 shows that the value of a two-tree prediction
matches arithmetically, but the addend to 0.1126044 is not found in results
for single.tree prediction.

search document for -0.04196866 shows that this value is found
in predictions for two-tree sum and single.tree = TRUE result, and switches
class position from prediction set 1 to prediction set1 (single.tree).

David



On Tue, Mar 27, 2018 at 8:08 AM, Andreas Tille  wrote:

> Hello Harry,
>
> On Tue, Mar 27, 2018 at 02:41:28PM +0100, Harry Southworth wrote:
> > That post is about 2.5 years old and the version of gbm is 2.1.1.
>
> That's correct.  The original maintainer seems to have lost interest and
> I'm now trying to polish the list of bugs in any R package in Debian.
>
> > The version on CRAN is now 2.1.3 but has status ORPHANED.
>
> Thats the currently packaged version of gbm in Debian but I have no
> sign that the issue has changed (bug reporter is in CC).
>
> > Since then, gbm maintenance got moved around a couple more times. You
> > can find it's current page here:
> > https://github.com/gbm-developers
> >
> > To address, the question: I don't understand it.
>
> Puh, that's relaxing for me since I do not understanding it as well. ;-)
>
> > However, I do recall
> > that there were a number of known bugs in the multinomial
> > functionality and that that functionality was dropped from gbm3 (a
> > newer version, rewritten from the ground up, but whose development
> > appears to have stalled).
> >
> > I've posted in GitHub, but don't know how likely it is that you'll get
> > a helpful response.
>
> That's a very helpful response.  I subscribed issue #21 and will wait
> for a better answer.
>
> > Sorry not to be more helpful,
>
> Thanks a lot for the quick response
>
>   Andreas.
>
> Control: forwarded -1 https://github.com/gbm-developers/gbm/issues/21
>
> > On 27 March 2018 at 13:27, Andreas Tille  wrote:
> > > Hello Harry,
> > >
> > > the R packaging team is maintaining gbm in Debian.  A user has filed a
> > > bug report against version 2.1.1 which I would like to bring to your
> > > attention.  Please have a look here where the problem is explicitly
> > > described:
> > >
> > > https://bugs.debian.org/805395
> > >
> > > Could you please comment on this?  I admit I do not fully understand
> > > what exactly is incorrect here and what to expect.  May be some test
> > > case would help to confirm the integrity of the code.
> > >
> > > Kind regards
> > >
> > >Andreas.
> > >
> > >
> > > Control: tags -1 help
> > > Control: forwarded -1 Harry Southworth 
> > >
> > >
> > > --
> > > http://fam-tille.de
> >
>
> --
> http://fam-tille.de
>
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2018-03-27 Thread Harry Southworth
Just had a message from Brandon Greenwell saying he hopes to look into it
after end of term. He's likely your best bet.
Harry

On 27 Mar 2018 4:08 pm, "Andreas Tille"  wrote:

Hello Harry,


On Tue, Mar 27, 2018 at 02:41:28PM +0100, Harry Southworth wrote:
> That post is about 2.5 years old and the version of gbm is 2.1.1.

That's correct.  The original maintainer seems to have lost interest and
I'm now trying to polish the list of bugs in any R package in Debian.


> The version on CRAN is now 2.1.3 but has status ORPHANED.

Thats the currently packaged version of gbm in Debian but I have no
sign that the issue has changed (bug reporter is in CC).


> Since then, gbm maintenance got moved around a couple more times. You
> can find it's current page here:
> https://github.com/gbm-developers
>
> To address, the question: I don't understand it.

Puh, that's relaxing for me since I do not understanding it as well. ;-)


> However, I do recall
> that there were a number of known bugs in the multinomial
> functionality and that that functionality was dropped from gbm3 (a
> newer version, rewritten from the ground up, but whose development
> appears to have stalled).
>
> I've posted in GitHub, but don't know how likely it is that you'll get
> a helpful response.

That's a very helpful response.  I subscribed issue #21 and will wait
for a better answer.


> Sorry not to be more helpful,

Thanks a lot for the quick response

  Andreas.

Control: forwarded -1 https://github.com/gbm-developers/gbm/issues/21


> On 27 March 2018 at 13:27, Andreas Tille  wrote:
> > Hello Harry,
> >
> > the R packaging team is maintaining gbm in Debian.  A user has filed a
> > bug report against version 2.1.1 which I would like to bring to your
> > attention.  Please have a look here where the problem is explicitly
> > described:
> >
> > https://bugs.debian.org/805395
> >
> > Could you please comment on this?  I admit I do not fully understand
> > what exactly is incorrect here and what to expect.  May be some test
> > case would help to confirm the integrity of the code.
> >
> > Kind regards
> >
> >Andreas.
> >
> >
> > Control: tags -1 help
> > Control: forwarded -1 Harry Southworth 
> >
> >
> > --
> > http://fam-tille.de
>

--
http://fam-tille.de
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2018-03-27 Thread Andreas Tille
Hello Harry,

On Tue, Mar 27, 2018 at 02:41:28PM +0100, Harry Southworth wrote:
> That post is about 2.5 years old and the version of gbm is 2.1.1.

That's correct.  The original maintainer seems to have lost interest and
I'm now trying to polish the list of bugs in any R package in Debian.

> The version on CRAN is now 2.1.3 but has status ORPHANED.

Thats the currently packaged version of gbm in Debian but I have no
sign that the issue has changed (bug reporter is in CC).
 
> Since then, gbm maintenance got moved around a couple more times. You
> can find it's current page here:
> https://github.com/gbm-developers
> 
> To address, the question: I don't understand it.

Puh, that's relaxing for me since I do not understanding it as well. ;-)

> However, I do recall
> that there were a number of known bugs in the multinomial
> functionality and that that functionality was dropped from gbm3 (a
> newer version, rewritten from the ground up, but whose development
> appears to have stalled).
> 
> I've posted in GitHub, but don't know how likely it is that you'll get
> a helpful response.

That's a very helpful response.  I subscribed issue #21 and will wait
for a better answer.
 
> Sorry not to be more helpful,

Thanks a lot for the quick response

  Andreas.

Control: forwarded -1 https://github.com/gbm-developers/gbm/issues/21
 
> On 27 March 2018 at 13:27, Andreas Tille  wrote:
> > Hello Harry,
> >
> > the R packaging team is maintaining gbm in Debian.  A user has filed a
> > bug report against version 2.1.1 which I would like to bring to your
> > attention.  Please have a look here where the problem is explicitly
> > described:
> >
> > https://bugs.debian.org/805395
> >
> > Could you please comment on this?  I admit I do not fully understand
> > what exactly is incorrect here and what to expect.  May be some test
> > case would help to confirm the integrity of the code.
> >
> > Kind regards
> >
> >Andreas.
> >
> >
> > Control: tags -1 help
> > Control: forwarded -1 Harry Southworth 
> >
> >
> > --
> > http://fam-tille.de
> 

-- 
http://fam-tille.de

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2018-03-27 Thread Andreas Tille
Hello Harry,

the R packaging team is maintaining gbm in Debian.  A user has filed a
bug report against version 2.1.1 which I would like to bring to your
attention.  Please have a look here where the problem is explicitly
described:

https://bugs.debian.org/805395

Could you please comment on this?  I admit I do not fully understand
what exactly is incorrect here and what to expect.  May be some test
case would help to confirm the integrity of the code.

Kind regards

   Andreas.


Control: tags -1 help
Control: forwarded -1 Harry Southworth 


-- 
http://fam-tille.de

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Re: Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2015-11-17 Thread Andrei POPESCU
Control: reassign -1 r-cran-gbm 2.1-1

On Ma, 17 nov 15, 09:29:12, David Paulsen wrote:
> Package: gbm
> Version:  2.1.1
> 
> For the bernoulli distribution model, predict.gbm(model, n.trees=c(1,2), 
> single.tree=TRUE) returns the correct results.
> 
> For the multinomial distribution model with 3 classes, the results are 
> incorrect. The first tree is accurate, but the results for the second tree 
> appears to contain predictions for two different classes, and third value I 
> cannot identify. Although the data I’m using can’t be shared, the results are 
> clearly inaccurate as they do not appear in the first 6 trees. 
> 
> 
> pretty.gbm.tree(current_upsell_gbm, 1)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> Weight  Prediction
> # 000.990708431 5   6  79.811835   
> 4585 -0.01284530
> # 100.783407272 3   4   9.726234   
> 1669  0.02624326
> # 2   -10.06888412   -1-1  -1   0.00
> 233  0.06888412
> # 3   -10.01932451   -1-1  -1   0.00   
> 1436  0.01932451
> # 4   -10.02624326   -1-1  -1   0.00   
> 1669  0.02624326
> # 5   -1   -0.03568803   -1-1  -1   0.00   
> 2856 -0.03568803
> # 6   -1   -0.01284530   -1-1  -1   0.00 
> 60 -0.01284530
> 
> pretty.gbm.tree(current_upsell_gbm, 2)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> WeightPrediction
> # 00  9.907084e-011 2   6  25.187460   
> 4585  0.0001823204
> # 1   -1 -2.174955e-02   -1-1  -1   0.00   
> 1669 -0.0217495506
> # 2   17  4.118500e+043 4   5   5.837505   
> 2856  0.0129989496
> # 3   -1  1.728153e-02   -1-1  -1   0.00   
> 2426  0.0172815334
> # 4   -1 -1.116279e-02   -1-1  -1   0.00
> 430 -0.0111627907
> # 5   -1  1.299895e-02   -1-1  -1   0.00   
> 2856  0.0129989496
> # 6   -1  1.823204e-04   -1-1  -1   0.00 
> 60  0.0001823204
> 
> pretty.gbm.tree(current_upsell_gbm, 3)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> Weight   Prediction
> # 00   0.9686616681 2   6  16.796788   
> 4585  0.012662983
> # 1   -1  -0.006388166   -1-1  -1   0.00   
> 1538 -0.006388166
> # 24   3.53 4   5   7.753722   
> 2987  0.022472380
> # 3   -1   0.030072289   -1-1  -1   0.00   
> 2075  0.030072289
> # 4   -1   0.005180921   -1-1  -1   0.00
> 912  0.005180921
> # 5   -1   0.022472380   -1-1  -1   0.00   
> 2987  0.022472380
> # 6   -1   0.012662983   -1-1  -1   0.00 
> 60  0.012662983
> 
> 
> 
> pretty.gbm.tree(current_upsell_gbm, 4)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> Weight  Prediction
> # 000.968438941 5   6  80.145080   
> 4585 -0.01039978
> # 100.924231392 3   4   7.579153   
> 1497  0.03221919
> # 2   -10.04372024   -1-1  -1   0.00
> 977  0.04372024
> # 3   -10.01061048   -1-1  -1   0.00
> 520  0.01061048
> # 4   -10.03221919   -1-1  -1   0.00   
> 1497  0.03221919
> # 5   -1   -0.03153981   -1-1  -1   0.00   
> 3018 -0.03153981
> # 6   -1   -0.01039978   -1-1  -1   0.00 
> 70 -0.01039978
> 
> pretty.gbm.tree(current_upsell_gbm, 5)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> WeightPrediction
> # 00  9.907084e-011 2   6  22.723666   
> 4585  0.0009275118
> # 1   -1 -2.021911e-02   -1-1  -1   0.00   
> 1644 -0.0202191098
> # 2   15  5.216700e+043 4   5   6.990267   
> 2871  0.0130365491
> # 3   -1  1.779042e-02   -1-1  -1   0.00   
> 2423  0.0177904212
> # 4   -1 -1.267468e-02   -1-1  -1   0.00
> 448 -0.0126746834
> # 5   -1  1.303655e-02   -1-1  -1   0.00   
> 2871  0.0130365491
> # 6   -1  9.275118e-04   -1-1  -1   0.00 
> 70  0.0009275118
> 
> pretty.gbm.tree(current_upsell_gbm, 6)
> #   SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction 
> Weight   Prediction
> # 00  9.684389e-011 2   6   21.27357   

Processed: Re: Bug#805395: predict.gbm() using single.tree=TRUE does not return the correct predictions with multinomial distribution

2015-11-17 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 r-cran-gbm 2.1-1
Bug #805395 [gbm] predict.gbm() using single.tree=TRUE does not return the 
correct predictions with multinomial distribution
Warning: Unknown package 'gbm'
Bug reassigned from package 'gbm' to 'r-cran-gbm'.
No longer marked as found in versions 2.1.1.
Ignoring request to alter fixed versions of bug #805395 to the same values 
previously set
Bug #805395 [r-cran-gbm] predict.gbm() using single.tree=TRUE does not return 
the correct predictions with multinomial distribution
Marked as found in versions r-cran-gbm/2.1-1.

-- 
805395: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805395
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers