nspope / radish

Fast gradient-based optimization of resistance surfaces
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

How to extract resistance values from fitted conductance surface #9

Open j3ss42 opened 7 months ago

j3ss42 commented 7 months ago

Hi,

I have created an optimised conductance surface for categorical landcover variables (using loglinear conductance and mlpe) and plotted the conductance surface, and I would also like the resistance surface, and resistance values for each landcover type, scaled between 1 - 100.

However, I am not sure how to calculate this from the conductance surface.

According to the radish manual, "conductance[i] = exp(covariates[i,] %*% theta)", and conductance = 1/ resistance, so would resistance_surface <- 1/ log(conductance_surface) be correct, and then scale the outputs to the desired range?

Many thanks,