Skip to content

Commit

Permalink
LSO model
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens committed Feb 16, 2024
1 parent 4235cf6 commit 1c7594e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 4 additions & 2 deletions analysis/04_regression_training_LSO.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Basic xgboost model with limited
# hyperparameter tuning
# hyperparameter tuning with
# leave site out cross validation

# load the ecosystem
library(tidymodels)
Expand All @@ -14,7 +15,8 @@ ml_df <- read_ml_data(
spatial = TRUE
)

results <- lapply(unique(ml_df$site)[1:2], function(site){
# Leave-Site-Out cross validation loop
results <- lapply(unique(ml_df$site), function(site){

#---- data partitioning ----

Expand Down
17 changes: 17 additions & 0 deletions data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Input data consist of the driver data file:

Which contains all data required for the analysis.

Spectral indices are downloaded from:
https://awesome-ee-spectral-indices.readthedocs.io/
on 15/02/2024

more info on indices here:
https://www.indexdatabase.de/

## Output

Two models are created, a binary classification (drought day or not), and an
Expand All @@ -17,6 +24,16 @@ folder and output is called,
classification models respectively. These are the best models selected after
cross validation (see code in the `analysis` folder).

### LSO

The LSO directory contains all models of the leave-site-out model training
runs, the model name reflects the run for which the site was ommitted from
training,

`test_*.rds`

would therefore be trained on all data but that from the `test` site.

### Annotated manuscript

An annotated manuscript of the model result is written up in the vignettes
Expand Down

0 comments on commit 1c7594e

Please sign in to comment.