Habitat Quality model - Degradation output with negative values

Hi everybody!

I ran the Habitat Quality model (InVEST v3.8.9) with the following inputs:

  • current LULC map
  • threats maps
  • accessibility shapefile
  • sensitivity and threats csv
  • 0.5 value for k (first for calibration)

The model generated a Habitat Quality output with values from 0 to 1, easily interpretable, while the Habitat Degradation output generated has negative values (from -3.40282e+38 to 0).
What could have led to this result?

I put the input and output data in the following Drive folder

Thank you!



Hi @chiara.richiardi, thanks for posting.

A few things come to mind.

First, looking at the degradation raster, there is variation in those values, and apart from them being negative, it does makes sense visually - pixels with the higher degradation scores have the lower quality scores, and vice versa.

Second, I noticed in the Sensitivity CSV input, all of the scores in every row and column are 0. From the User’s Guide in reference to the Habitat column of that table:

HABITAT : Each LULC type is assigned a habitat score (HjHj in the equations above), from 0 to 1. If you want to simply classify each LULC as habitat or not without reference to any particular species group then use 0s and 1s where a 1 indicates habitat.

So all 0s would indicate none of the LULC types are being classified as habitat. I’m not experienced enough with this model to know what to expect in that case. But is that your intention? Or is possible you need to adjust the values in this table and then see if the results make more sense?

Let us know how that goes!

Hi @dave, thank you for your quick reply!

Ok, so it makes sense!
So my output’s values goes to -3.40282e+38 = no degradation to 0 = high degradation.

Is it a big problem not being able to calibrate the k value?

For the second part, I checked the Sensitivity table and, it is true, it can be misleading because the first 26 land use classes have all 0 values (because them belong to urbanized land use), but then the others (natural and semi-natural classes) have discrete values between 0 and 1 for the Habitat value and for the values of Sensitivity to threats. Is this approach wrong?

Thank you for your support!

No that’s not wrong! That’s my mistake for not looking closely enough at the table!

Oh, good question. Well it’s my understanding (from the User’s Guide) that calibrating k is helpful for “spreading out” the quality scores so that the variation across the landscape is more easily visible. I’m not sure if you really have this problem in your preliminary results.

I agree with you that it would still be nice to explain why those degradation values are so tiny and negative. I’m finally running your data through the latest version of invest (not yet released). Some of the main Habitat Quality algorithms had some recent improvements. So I’ll report back if this is still an issue in the latest version. Looks like it will take a few hours…


Hi @chiara.richiardi, it looks like the latest version of Habitat Quality does not have this issue and produces more reasonable degradation values. And the quality values look exactly the same.

Here’s a link to a development build of invest if you would like to try it.

The CSV inputs have changed slightly, so I’ll attach the versions I used.
Sensitivity_39.csv (10.1 KB) Threats_39.csv (319 Bytes)

And the latest User’s Guide http://releases.naturalcapitalproject.org/invest/3.8.9.post600+g93281903/userguide/habitat_quality.html

While the range of degradation values seems more reasonable, it’s a little puzzling that now there is no longer an inverse relationship between degradation and quality. There was an inverse relationship in your original results when the degradation values were negative. @dcdenu4 you might be interested in this.

1 Like

@dave thanks for the heads up. I’ll take a look.



Hi @chiara.richiardi,

After looking at the outputs from the development build against the older build, I feel that everything seems to be in working order now. There were some big fixes made to how threat rasters are decayed across the landscape and you can likely see this between versions in files like intermediate/filtered_agro1_c.

The relationship between the quality and degradation outputs will vary widely depending on how the Sensitivity table is set up. After spot checking a few LULC areas everything looks reasonable to me. If you think something looks wrong in the development version Dave posted please let me know and I’ll take a closer look.