birdepy / birdepy_project

BirDePy is a Python package for working with continuous time birth-and-death processes.
https://birdepy.github.io
GNU General Public License v3.0
7 stars 1 forks source link

Clarification : Parameter Estimation API #8

Closed nsankar closed 3 years ago

nsankar commented 3 years ago

@bpatch Firstly, Thanks for developing this great package with excellent documentation.

I am learning the library and am trying to connect the dots and interpret the APIs. I have a few questions on the below statement referred in the docs. where I am trying to understand the key "lambda-2" and "mu-2" functions from the perspective of the models , parameters and the APIs .. image

Suppose, I have a population data (discrete time) and I use BirDepy estimator API to estimate the parameters from the data for the "Ricker model" , 1) Does the return values of the estimator compute the following parameters indicated in a table in the doc which is as below ? image

2) Is it correct in my understanding that using the above estimated parameters as shown below, we can then compute the outcomes of these following two functions ? Does these functions indicate the population ‘birth-rate’ and ‘death-rate’ ? image

image

Thanks in advance for the support.

bpatch commented 3 years ago

Hi, thank you for your interest in BirDePy and kind words. Thank you for pointing out that this may be a bit confusing. In a future version I will likely add a message to the output which further clarifies how the output of birdepy.estimate() should be interpreted.


  1. The function birdepy.estimate() returns an object which has several attributes. Attribute 'p' corresponds to the estimated parameter values and is in the canonical order given by the table on this page (https://birdepy.github.io/processes.html).

For example, running:

est = birdepy.estimate(obs_times, pop_sizes, p0, p_bounds, model='Ricker') print(est.p)

will print out a list of length 4 which contains the estimated values of gamma, nu, alpha and c. Note that depending on how much data you have available, you may wish to use the key word arguments 'known_p' and 'idx_known_p' of birdepy.estimate() to specify some of the parameter values (e.g., setting c=1 when using the Ricker model) as described at https://birdepy.github.io/estimation.html#known-parameters .


  1. Yes, that is correct. Once the parameter values have been estimated, they can be used to determine the population birth-rate and death-rate for each population size z. Note that these quantities are functions of the population size z.
nsankar commented 3 years ago

@bpatch Thanks again for clarifying.