open-AIMS / ADRIA_matlab

Repository for the development of ADRIA: Adaptive Dynamic Reef Intervention Algorithms. ADRIA is a multi-criteria decision support tool set particularly useful for informing reef restoration and adaptation interventions.
1 stars 0 forks source link

Investigate possible site id mismatch #78

Closed ConnectedSystems closed 2 years ago

ConnectedSystems commented 2 years ago

We see somewhat suspicious results that do not align with IPMF.

Could be an issue with how the site layer is being assimilated. Needs a closer look.

ConnectedSystems commented 2 years ago

Confirmed issue with how site_id, recom_id, and reef_siteids are aligned.

The process inside ADRIA is unaffected, this only affects how the results are matched up with their corresponding sites for reporting/plotting.

For now, the following needs to be accounted for:

Site Data

I will look into including the "reef_siteid" as part of the result set

ConnectedSystems commented 2 years ago

Hi @Rosejoycrocker

Was about to send off update site rankings but noticed something that I want to doubly confirm:

Originally we were using recom_connectivity internally in ADRIA for site IDs - this was fine as we were matching up with the connectivity dataset directly (305 sites).

depth_coral_priority_recom_ids = site_data{(depth_criteria+coral_criteria)==2, "recom_connectivity"};

But now the recom_connectivity IDs don't actually line up with the connectivity or site data - is there something inside the DMCDA method that relies on recom IDs or is it straight numeric values that indicate row/column position?

If not, we should rely purely on index position:

depth_coral_priority_idx = find((depth_criteria+coral_criteria)==2);

EDIT: @Rosejoycrocker nevermind - figured it out, as I left a helpful note in comments/docstrings. We should pass in index IDs, not recom_ids into the DMCDA function.

I am reordering both the site_data when it is read in and the connectivity data based on the indicated reef_siteid. This is so the connectivity indices match their related counterparts in the site data file.

@KRNA01 This reordering shouldn't affect anything right? (I am applying the reordering to both rows and columns)

I have this in place and am finishing up now, but will hold off til the morning before I send anything off so you have a chance to confirm.

ConnectedSystems commented 2 years ago

selected_sites_k_values_tbl_idx

KRNA01 commented 2 years ago

@ConnectedSystems, if site IDs are matching rows and columns in the transition probability matrix, and these same siteIDs and in the same order are carried through other functions, then I can't see it affecting anything else. @Rosejoycrocker, can you check this this doesn't upset the site-selection functions, please?

ConnectedSystems commented 2 years ago

@Rosejoycrocker just a reminder about this.

If my change from recom_id to table index does not affect DMCDA then I think we can be 100% confident it is ranking the sites as indicated in the site_data table

Rosejoycrocker commented 2 years ago

Hi @ConnectedSystems sorry I think I read this and then forgot to reply. The site selection function only cares whether all the criteria vectors input match in terms of the order of sites. So for example if the IDs for connectivity from row one to three are 1,6,9 then the IDs for summed coral cover for rows one to three should also be 1,6,9. Does this answer the question?

ConnectedSystems commented 2 years ago

Yes, I think we're 99% good to go.

@KRNA01 as one final check, could you have a quick scan over the plot I attached above? Do the selected sites look weird in any way?

ConnectedSystems commented 2 years ago

@KRNA01 Please look at this updated figure instead

selected_sites_k_values_tbl_idx

KRNA01 commented 2 years ago

I think I can count 6 sites, or is the far east one on Elford one site?
Distribution makes sense from both a connectivity and DHW perspective. Don't have visibility of k, depth and coral covers.

If you're 99% confident, then I think we're more than ready 👍

ConnectedSystems commented 2 years ago

Hi @KRNA01

If you click on the image it will open in a separate tab/window and make it easier to see. The 6 you see are the unique ones as I am overlaying the Top 10 when filtering by depth alone, and by depth and coral cover (<= 15%).

I will send off the files now.