Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
feature_abundances function #86
As discussed in #84, it would be good to have a function that returns the maximum amount of each feature in the planning units in a problem object to help with target setting. This function could probably use the
Thanks a lot for this, it is great to see that are so interesting in hearing the feedback form other users and so fast at working on them.
So, I have been testing the new function "feature_abundances()".
If I am right, the function returns the abundance of every species in all planning units (including NAs) or just in those with data (excluding NAs). But, still, planning units that are locked-out are not NAs, so there is no option to retrieve abundance in all planning units available to select, right?
Currently, I am using something similar to the add_max_features_objective() with really large budget approach that you suggested. Instead of that, I am just building a raster manually where each PU value is 1, except those locked-out, which are 0, and checking feature_representation using that raster as solution.
Thanks for the help!
Yeah the feature abundance has a
Yeah, that's right, there isn't an easy way to calculate the maximum possible representation for different features.
Yeah, that approach sounds great. Even though you're not using the add_max_features objective, I just wanted to say that the max features objective will aim to meet the targets for as many features as possible. But if it can't meet the targets for some species then it doesn't care if these species are represented at 0% or 90% of the target (so in many cases these species will be poorly represented in the solution). So if you really wanted to guarantee that all features are well represented in the solution, then I think you would need to use the min set objective with manually calculated targets (which it sounds like this is exactly what you're doing).