Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.maths.stats.special.lgam

All Samples(18)  |  Call(12)  |  Derive(0)  |  Import(6)

```#!/usr/bin/env python
from __future__ import division
from cogent.maths.stats.special import lgam
from cogent.maths.optimisers import minimise
from math import ceil, e
```
```def brillouin_d(counts):
"""Brilloun index of alpha diversity: Pielou 1975, by way of SDR-IV."""
nz = counts[counts.nonzero()]
n = nz.sum()
return (lgam(n+1) - array(map(lgam, nz+1)).sum())/n
```

```#!/usr/bin/env python
from __future__ import division
from cogent.maths.stats.special import lgam
from cogent.maths.optimisers import minimise
from math import ceil, e
```
```def brillouin_d(counts):
"""Brilloun index of alpha diversity: Pielou 1975, by way of SDR-IV."""
nz = counts[counts.nonzero()]
n = nz.sum()
return (lgam(n+1) - array(map(lgam, nz+1)).sum())/n
```

```#!/usr/bin/env python
from __future__ import division
from cogent.maths.stats.special import lgam
from cogent.maths.optimisers import minimise
from math import ceil, e
```
```def brillouin_d(counts):
"""Brilloun index of alpha diversity: Pielou 1975, by way of SDR-IV."""
nz = counts[counts.nonzero()]
n = nz.sum()
return (lgam(n+1) - array(map(lgam, nz+1)).sum())/n
```

```    t_high, t_low, tprob, f_high, f_low, fprob, binomial_high, binomial_low, \
ndtri
from cogent.maths.stats.special import lgam, log_one_minus, one_minus_exp,\
MACHEP
from cogent.maths.stats.ks import psmirnov2x, pkstwo
```
```def combinations(n, k):
"""Returns the number of ways of choosing k items from n.
"""
return exp(lgam(n+1) - lgam(k+1) - lgam(n-k+1))

```

```    t_high, t_low, tprob, f_high, f_low, fprob, binomial_high, binomial_low, \
ndtri
from cogent.maths.stats.special import lgam, log_one_minus, one_minus_exp,\
MACHEP
from cogent.maths.stats.ks import psmirnov2x, pkstwo
```
```def combinations(n, k):
"""Returns the number of ways of choosing k items from n.
"""
return exp(lgam(n+1) - lgam(k+1) - lgam(n-k+1))

```

```    t_high, t_low, tprob, f_high, f_low, fprob, binomial_high, binomial_low,
ndtri)
from cogent.maths.stats.special import (lgam, log_one_minus, one_minus_exp,
MACHEP)
from cogent.maths.stats import chisqprob
```
```def combinations(n, k):
"""Returns the number of ways of choosing k items from n.
"""
return exp(lgam(n+1) - lgam(k+1) - lgam(n-k+1))

```