Skip to content
Geut Galai edited this page Oct 21, 2025 · 7 revisions

The code used to produce the results presented in the paper. All the code files are located in this repository under a folder with the same name.

Scripts:

Abramov_et_al_spatial_prediction_analysis.R

Description

This script contains the main code producing the results in the paper. It contains:

  1. Island-scale prediction.
  2. Jaccard analysis
  3. Distance decay
  4. Correlations

Input

emln dataset no. 60: dataset of plant-pollinator interactions collected in the canary islands that was archived in the emln R package. used to build the layers of the network.

data/distance_between_sites_canary.csv: used to calculate correlations in the analysis. Taken from the paper that collected the data.

Output

results/predictions_island_scale.rds: The results of the link prediction. used for further analysis in the same scripts as well as in other scripts

other results: correlation results and plotting, that doesn't produce a separated file.


k_swap.R

Description

This script handles a sensitivity analysis to check the combined effect of different Ks and lambdas.

Input

results/predictions_island_scale.rds: The predictions found by Abramov_et_al_spatial_prediction_analysis.R script

Output

plot: boxplot to visualize f1s for each


site_scale_spatial_prediction_analysis.R

Description

This script contains the code for site scale analysis. It contains:

  1. Island-scale prediction.
  2. Jaccard analysis
  3. Distance decay
  4. ecological inference

Input

emln dataset no. 60: dataset of plant-pollinator interactions collected in the canary islands that was archived in the emln R package. used to build the layers of the network.

data/distance_between_sites_canary.csv: used to calculate correlations in the analysis. Taken from the paper that collected the data.

Output

results/predictions_site_scale.rds: The results of the link prediction, but this time, site scale.

other results: correlation results and plotting, isn't saved in a separated file.


subset_analysis_comparison.R

Description

This script contains the code to compare prediction quality when using the entire species pools of A and P for prediction vs. prediction done based on subsetting only the species they share.

Input

emln dataset no. 60: dataset of plant-pollinator interactions collected in the canary islands that was archived in the emln R package. used to build the layers of the network.

data/distance_between_sites_canary.csv: used to calculate correlations in the analysis. Taken from the paper that collected the data.

Output

results: correlation results and plotting, but isn't saved in a separated file.


Clone this wiki locally