Single script handles all package dependency installation and loading.
Variable ROOT_DATA_PATH must be updated to your preferred location for
saving model input, fitted models, predictions, etc.
source("setup.R")
Scripts:
-
background_points.R
- Collects OBIS observations for a specific species
- Filters observations by depth cutoff (ie <= 500m)
- Gathers background points for each month (average number of presence observations per month)
- Writes observations (presence and background) to file
-
covariates.R
- Reads in model input
- Loads environmental covariates as stars object
- Matches each point in model input with covariates
- Writes model input to file
-
models.R
- Loads model input (presence and background points matched with covariates)
- Splits input using 80% training 20% testing ratio
- Splits training set into 5 validation folds
- Defines model types along with hyperparameters to tune
- Fits each model using cross-validation while also tuning hyperparameters through search
- Saves fitted version of highest performing model from each type
-
predictions.R
- Loads fitted models and monthly climatologies
- Predicts probability of species occurence across each month for full domain of cimatology