-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation output utils: only alive species? #112
Comments
Questions that raised by discussing with @ismael-lajaaiti ! |
Thanks for writing this all of this, it's clear and it's good a basis to discuss all of these tricky choices.
|
Hi @alaindanet and sorry for the late response. Regarding 1., I agree with @ismael-lajaaiti here that method 1 is definitely the way to go. The
@alaindanet Maybe there is a misunderstanding here that the
@ismael-lajaaiti I would not even be surprised that such a test would fail one day and yet Regarding 2. I'm sorry I can't participate in the discussion because I'm not even sure what CV really is or mean. Maybe @skefi, @andbeck, @evadelmas would answer your concern best? Regarding 3. I'm afraid the answer would depend on 2. But in any case, you can help us read your suggested code by colorizing it a little 0:) Did you know that instead of:
Yielding:
You could replace the upper function this_is_julia_code(a, b = 4)
# comment
end ^ ^ |
Regarding this discussion, Furthermore, I kept only the species that have an average biomass above 0 over the last timesteps to prevent NaN values. I hope that it makes sense! |
Threshold
Currently, the functions work with a
threshold
argument that enables the user to decide a cut-off to consider species as extinct. But discussing with @ismael-lajaaiti, it appears more consistent to rely on the threshold defined insimulate()
.threshold=0
as default instead ofeps()
(asExtinctionCallBack()
set extinct species to 0)Should we be more strict and remove the possibility to set another threshold, i.e. should we remove
threshold
argument from all output analysis functions?Determine alive and extinct species
We can determine which species is alive or extinct with two methods, either with the
Dict
fromsimulate()
output or we can infer it from thesolution
matrix (Refer to #110 )Method 1: from
simulate()
'sDict
Method 2: from the
solution
matrixI feel that the method 2 is a bit more robust because it relies on the definition of extinct species given by the
solution
object, i.e.biomass == 0.0
set by theExtinctionCallBack()
(it is very unlikely to change).while the second relates on the structure of the output
get_extinct_species(sol)
What do you think?
Exclude extinct species?
Coefficient of variation
Should the temporal coefficient of variation only consider alive species at the end of the simulation ? (Currently consider species that have an average biomass different from 0 to prevent
NaN
)Average trophic level
last
timesteps (trophic_structure()
) should exclude extinct species of the network at each timestep and compute the metric.Warning
If we consider that ouput analysis should be done with only alive species:
If yes, a suggestion:
The text was updated successfully, but these errors were encountered: