Parameters: |
|
---|---|
Returns: | random neutral distribution of abundance |
other args should be of kind theta, I, m
Example:
import ecolopy_dev
ecolopy.generate_random_neutral_abundance('ewens', 100, theta=12, I=12)
computes Shannon entropy (H) for a given abundance table and number of individuals.
Parameters: | abund – distribution of abundances as list |
---|---|
Returns: | Shannon entropy |
Draw contour plot of the log likelihood of a given abundance to fit Etienne model.
Parameters: |
|
---|
draws distribution of Shannon values for random neutral
Parameters: |
|
---|
same as Abundance inner function, but takes advantage of constant m value when varying only theta.
Parameters: |
|
---|
takes advantage of recurrence function:
and as s(whatever, 0) = 0 :
keep only needed stirling numbers (necessary for large communities)
Parameters: |
|
---|
computes the product of 2 polynomials, depending of the differences in length of the two polynomials, this function will call one of: * _mul_uneq_polyn: when length of polyn_a is >= length of polyn_b, will iterate over coefficient. * _mul_simil_polyn: in case both polynomials have equal length, will iterate over factors.
to test multiplication of pylnomials try equality of the two functions: mul_uneq_polyn(polyn_a, polyn_b, len_a, len_b) == _mul_simil_polyn(polyn_a, polyn_b, len_a, len_b)
Example:
from ecolopy_dev.utils import mul_polyn
# (2 + 3^x + 5x^2) * (x)
mul_polyn([2,3,5], [0,1])
# will return: [mpfr('0.0'), mpfr('2.0'), mpfr('3.0'), mpfr('5.0')]
# that is: 0 + 2x + 3x^2 + 5x^3
Parameters: |
|
---|---|
Returns: | a list representing multiplication of the two polynomials |