pyGAM
pyGAM copied to clipboard
add negative binomial and correspong log link
negative binomial is good for modeling counts where there are more zeros than expected by a poisson model
http://dept.stat.lsa.umich.edu/~kshedden/Courses/Stat600/Notes/glm.pdf http://www.biostat.umn.edu/~dipankar/bmtry711.11/lecture_13.pdf
Any chance there has been progress on this front? Negative binomial distribution modeling would be super useful! (Great package by the way!)
If nobody is working on this, would be happy to make a first contribution.
@owlas no one is working on this :) your contribution is most welcome. please let me know if you need any help or clarification.
@dswah using the current IRLS algorithm it's only possible to solve 1-parameter distributions correct?
Would an acceptable first alternative for the NegativeBinomial
be to specify the dispersion parameter as a given just as with the Binomial
objective:
https://github.com/dswah/pyGAM/blob/a93c904e47f458a2ccec47e3284e307fdea97fa5/pygam/distributions.py#L229-L246
I suppose the only solution to determine the dispersion would be to grid search over a range of values.
@owlas good point. yes, i think it is good first step to keep the dispersion parameter as a given for now.
Hi, just wondering how this is going... @owlas if you have done something even incomplete, do you have it on a personal fork? thanks!
Hey @fransua - thanks for bumping me.
I haven't got round to this. I'll get to work! Do you mind if I open a PR in the next 2 weeks?
@owlas sure, it would be great!
Interesting, looking forward for adding neg binomial