You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a little of an out-the-box question, but I'm wondering if you have a method in mind to be able to calculate the area of the window estimates (at the three % densities). I'm hoping to use this as a way of comparing different model accuracies.
I've been looking at attempting to convert the kd object from the density estimates in the plot_locator script into a contour object using contourlines and then calculating the area from IRTFM's answer here https://stackoverflow.com/questions/8406507/how-can-i-calculate-the-area-within-a-contour-in-r , however this is not spatially relevant and seems to output spurious results.
I then attempted to convert this to a SpatialLinesDataFrame with ContourLines2SLDF().
However, I am then stuck on two aspects;
which levels were used by the contour() plotting function per probability, as the calculation of probabilities as per https://stackoverflow.com/questions/16225530/contours-of-percentiles-on-level-plot is a little unclear as to its inner workings.
And 2) how to convert this lines object into closed polygons from which I can then calculate the area.
I'll keep working on it, but was just wondering whether you can provide any ideas.
I've attached (your) plotting script with my current edits for extracting the area as per lines 198-242 (plot_locator2.txt), as well as some example metadata (unknown and known for error calculations) and 20 predlocs from 1 sample. Please excuse the ugly way of attaching these, I'm still fairly new to coding!
Looking forward to hearing from you, let me know if you need any other information from me
Hi, @Imogen-D - this isn't something that we have looked at, and I don't know how to get this information out of the contour plots. Have you thought about some other measure of accuracy, e.g., mean pairwise distance between estimates? Or, the root-mean-squared distance of an estimate to the mean estimate? Or, what is the area of the minimal circle centered on the mean estimate that contains 95% of the estimates?
Thank you so much for your ideas, I'll have a think and see what I come up with, I have a feeling that something like the mean pairwise distance would be a much more straightforward approach and should show what we want it to.
Hi,
This is a little of an out-the-box question, but I'm wondering if you have a method in mind to be able to calculate the area of the window estimates (at the three % densities). I'm hoping to use this as a way of comparing different model accuracies.
I've been looking at attempting to convert the kd object from the density estimates in the plot_locator script into a contour object using contourlines and then calculating the area from IRTFM's answer here https://stackoverflow.com/questions/8406507/how-can-i-calculate-the-area-within-a-contour-in-r , however this is not spatially relevant and seems to output spurious results.
I then attempted to convert this to a SpatialLinesDataFrame with ContourLines2SLDF().
However, I am then stuck on two aspects;
And 2) how to convert this lines object into closed polygons from which I can then calculate the area.
I'll keep working on it, but was just wondering whether you can provide any ideas.
I've attached (your) plotting script with my current edits for extracting the area as per lines 198-242 (plot_locator2.txt), as well as some example metadata (unknown and known for error calculations) and 20 predlocs from 1 sample. Please excuse the ugly way of attaching these, I'm still fairly new to coding!
Looking forward to hearing from you, let me know if you need any other information from me
plot_locator2.txt
knownmetadata.txt
metadata.txt
A1_1.ALminmac200_7931566_locindv_predlocs.txt.gz
A1_1.ALminmac200_991410_locindv_predlocs.txt.gz
A1_1.ALminmac200_1092513_locindv_predlocs.txt.gz
A1_1.ALminmac200_1483743_locindv_predlocs.txt.gz
A1_1.ALminmac200_1548919_locindv_predlocs.txt.gz
A1_1.ALminmac200_2045261_locindv_predlocs.txt.gz
A1_1.ALminmac200_2171080_locindv_predlocs.txt.gz
A1_1.ALminmac200_2349043_locindv_predlocs.txt.gz
A1_1.ALminmac200_3038660_locindv_predlocs.txt.gz
A1_1.ALminmac200_3238820_locindv_predlocs.txt.gz
A1_1.ALminmac200_3484727_locindv_predlocs.txt.gz
A1_1.ALminmac200_3749675_locindv_predlocs.txt.gz
A1_1.ALminmac200_5333187_locindv_predlocs.txt.gz
A1_1.ALminmac200_5808436_locindv_predlocs.txt.gz
A1_1.ALminmac200_6034974_locindv_predlocs.txt.gz
A1_1.ALminmac200_6115573_locindv_predlocs.txt.gz
A1_1.ALminmac200_6381378_locindv_predlocs.txt.gz
A1_1.ALminmac200_6477477_locindv_predlocs.txt.gz
A1_1.ALminmac200_6993546_locindv_predlocs.txt.gz
A1_1.ALminmac200_7022405_locindv_predlocs.txt.gz
The text was updated successfully, but these errors were encountered: