osmose-model / osmose-web-api

Web service that generates Osmose configuration files from data sources like Fishbase and SeaLifeBase. Used by https://www.config.osmose-model.org .
MIT License
2 stars 2 forks source link

Making sure that we obtain as few NAs as possible for the focal functional groups #141

Closed agruss2 closed 6 years ago

agruss2 commented 6 years ago

@FIN-casey (CC: @jhpoelen @FIN-JBarile) The present issue is related to #115.

If you recall, the default value of the 9 following parameters for focal functional groups was set to NA in the “fishbase-mapping.csv” file: (1) species.lifespan.sp; (2) species.K.sp; (3) species.lInf.sp; (4) species.t0.sp. (5) species.length2weight.allometric.power.sp; (6) species.length2weight.condition.factor.sp; (7) species.maturity.size.sp; (8) species.maturity.age.sp; (9) species.relativefecundity.sp*.

Then, to be able to obtain as few NAs as possible for focal functional groups in OSMOSE configuration files, we decided to implement the following: (Let’s say we are dealing with a functional group called “smallpelagics” and the parameter “relative fecundity”). (1) For the “smallpelagics” functional group, the UI has identified, say, 20 species. (2) Before passing information to the API, the UI appends to these 20 species: a number N of species that belong to the genuses, families and orders of the 20 species. (3) When the API receives the list of 20 + N species from the UI, it first considers only the 20 species that belong to the “smallpelagics” functional group. -> (i) Case 1: data are available to derive a value for the parameter “relative fecundity” for some of the 20 species that belong to the “smallpelagics” functional group. In that case, the “data richness” rule described in #59 is applied to derive a parameter estimate for the pa-rameter “relative fecundity” for the “smallpelagics” functional group. -> (ii) Case 2: data are not available to derive a value for the parameter “relative fecundity” for none of the 20 species that belong to the “smallpelagics” functional group. In that case, the API will consider the N appended species to see if it can derive a value for the parameter “relative fecundity”. (4) If we have faced Case 2 above, then: -> Case 1: data are available to derive a value for the parameter “relative fecundity” for some of the N appended species. In that case, the “data richness” rule described in #59 is applied to the list of N appended species to derive a parameter estimate for the parameter “relative fecundity” for the “smallpelagics” functional group. -> (ii) Case 2: data are not available to derive a value for the parameter “relative fecundity” for none of the N appended species. In that case, the API will provide the value NA for the parameter “relative fecundity” for the “smallpelagics” functional group.

What is described above was successfully implemented a few months ago. However, I do not know which value was given to N (the number of appended species). N was set to some specific value (50? 100?), because we did not want to the bridge between FB/SLB and OSMOSE to take an excessively long time to deliver parameters.

However, today I ran a new test where I queried parameters for the Iceland Shelf/Sea ecosystem; and there was still a non-negligible number of NAs for focal functional groups in the OSMOSE configuration files.

Therefore, I have a simple question for @FIN-casey: What value did you give to N, the number of appended species? Once you have let me know, I will close the present GitHub issue and open a new one, where I will suggest a series of test to find a value for N that yields as few NAs as possible for the parameters for focal functional groups without excessively increasing the computation time.

agruss2 commented 6 years ago

@FIN-casey @FIN-JBarile As discussed with Skit and Deng on Skype a few days ago, I will create a test case for this GitHUb issue and will come back to you then with more details so that we can solve the present issue. Many thanks!

QQ-Sortiz commented 6 years ago

Hello @agruss2,

The maximum number of species per functional group is set to 30 as agreed on issue #59. The N number of species appended to the list is the maximum number of species per list, which is 30, minus the number of species per functional group so it varies for each functional group. The species that is being added is ranked according to the DataRichness value.

FIN-JBarile commented 6 years ago

@agruss2 I have the same interpretation of the code that gets the N related species added to the first set of species for a given functional group. So to follow on your example of 20 species above, the maximum number of related species that can be added is 10.

agruss2 commented 6 years ago

@QQ-Sortiz @FIN-JBarile Thank you very much for your replies and clarifications. I am going to close the present issue, because we have unfortunately too little time to run sensitivity tests to determine the optimum number of appended species. However, I may reopen this issue in the future, if time allows.