On 27 October 2011 14:18, <[email protected]> wrote:

> On Wed, Oct 26, 2011 at 10:50 PM, Alexandre Passos
> <[email protected]> wrote:
> > On Wed, Oct 26, 2011 at 22:48, Robert Layton <[email protected]>
> wrote:
> >> You have it correct. I haven't done this level of algebra for a while,
> so
> >> I'll need to work it out.
> >> If I have it correctly, I should be able to do:
> >> log(a!) + log(b!) + log((N-a)!) + log((N-b)!) - log(N!) - log(n!) -
> >> log((a-n)!) - log((b-n)!) - log((N-a-b+n)!),
> >> then apply Stirling and simplify?
> >
> > Exactly.
>
> gammaln works pretty well in scipy.stats.distributions. I would try
> that first, since it's easy, unless you expect only large numbers.
>
> Josef
>
> >
> > --
> >  - Alexandre
> >
> >
> ------------------------------------------------------------------------------
> > The demand for IT networking professionals continues to grow, and the
> > demand for specialized networking skills is growing even more rapidly.
> > Take a complimentary Learning@Cisco Self-Assessment and learn
> > about Cisco certifications, training, and career opportunities.
> > http://p.sf.net/sfu/cisco-dev2dev
> > _______________________________________________
> > Scikit-learn-general mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
> >
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>


>From my initial workings, Stirling collapses quite well for this equation
and should be fairly good.
I'll try it in the next couple of days and see.

I had a way of doing it that would be really robust, but really slow. Expand
each of the factorials on the denominator and numerator separately and store
as separate lists. Then remove all terms common to both lists and multiply
the results. However, this heavily uses append and would be too slow for
large value of N.

Thanks!

- Robert

-- 


My public key can be found at: http://pgp.mit.edu/
Search for this email address and select the key from "2011-08-19" (key id:
54BA8735)
Older keys can be used, but please inform me beforehand (and update when
possible!)
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to