-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
detail Prepare/Model/Combine sections
- Loading branch information
Showing
19 changed files
with
324 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: "Pseudo-absences" | ||
subtitle: "Generate pseudo-absence or background environmental values to compare with occurrence environment" | ||
--- | ||
|
||
Describe various strategies for generating pseudo-absences. | ||
|
||
- [Pseudo-absences • biomod2](https://biomodhub.github.io/biomod2/articles/vignette_pseudoAbsences.html) | ||
- [@barbet-massin2012] | ||
|
||
## All background | ||
|
||
A common Maxent strategy is to feed all background points into Maxent, and then to use the resulting distribution as a null model. This is the default strategy in Maxent [@phillips2017; @phillips2006; @phillips2008]. | ||
|
||
## Mask by FAO areas | ||
|
||
The FAO areas applicable to species are included in the `aquamapsdata`, presumably from evaluating OBIS observations and the literature. | ||
|
||
## Use occurrences from same Family, different species | ||
|
||
By using the same family, we can be sure that the pseudo-absences are ecologically similar to the species of interest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Calibrate | ||
|
||
The process of refining the model to only the most relevant environmental predictor terms is commonly called "Model Selection." One of the most cited scientific paper of all time [@akaike1974] is based on taking a most parsimonious approach to this process -- the so called Akaike Information Criteria (AIC). | ||
|
||
It is important to avoid using environmental predictors that are correlated with each other, since the effect of a predictor on the response could be the ecologically inverse, the result of explaining variance on the residuals of the other correlated predictor. | ||
|
||
## Predict | ||
|
||
The prediction step applies the environmental relationships from the fitted model to a new set of data, typically the seascape of interest, and perhaps with some sort of temporal snapshot (e.g., climatic annual or monthly average). | ||
|
||
## Evaluate | ||
|
||
Model evaluation uses the set aside test data from the earlier splitting to evaluate how well the model predicts the response of presence or absence. Since the test response data is binary \[0,1\] and the prediction from the model is continuous \[0-1\], a threshold needs to be applied to assign to convert the continuous response to binary. This is often performed through a Receiver Operator Characteristic (**ROC**) curve (@fig-rocr), which evaluates at each threshold the **confusion matrix** (@tbl-confusion-matrix). | ||
|
||
| | | | | | ||
|----------|--------------|---------------|----------------| | ||
| | | Predicted | | | ||
| | | 0 (absence) | 1 (presence) | | ||
| Observed | 0 (absence) | True absence | False presence | | ||
| | 1 (presence) | False absence | True presence | | ||
|
||
: Confusion matrix to understand predicted versus observed. {#tbl-confusion-matrix} | ||
|
||
![ROC curve generated by showing rates of false positive vs false negative as function of changing the threshold value (rainbow colors). Source: [ROCR: visualizing classifier performance in R](https://cran.rstudio.com/web/packages/ROCR/vignettes/ROCR.html)](figures/rocr.png){#fig-rocr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
title: "Combine SDMs" | ||
title: "Combine" | ||
subtitle: "Combine SDMs from the same or multiple species" | ||
--- | ||
|
||
We look at combining SDMs to calculate biodiversity based on addressing questions of interest and relevance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "Environment" | ||
subtitle: "Extract environmental predictors (static and/or dynamic) from various sources for observations (presence and pseudo-absence)" | ||
--- | ||
|
||
These data are also used at the prediction step. | ||
|
||
### Physiographic | ||
|
||
- `depth`\ | ||
Bathymetric Depth | ||
|
||
- `d2coast`\ | ||
Distance to Coast | ||
|
||
- `d2shelf`\ | ||
Distance to Shelf | ||
|
||
### Time Varying | ||
|
||
- `vgpm`\ | ||
Vertically integrated primary Productivity model | ||
|
||
### Depth & Time Varying | ||
|
||
- `temp`\ | ||
Temperature, either sea-surface temperature (SST) or some modeled product from HyCOM, ROMS or Copernicus | ||
|
||
- `salin`\ | ||
Salinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Evaluate | ||
|
||
Model evaluation uses the set aside test data from the earlier splitting to evaluate how well the model predicts the response of presence or absence. Since the test response data is binary \[0,1\] and the prediction from the model is continuous \[0-1\], a threshold needs to be applied to assign to convert the continuous response to binary. This is often performed through a Receiver Operator Characteristic (**ROC**) curve (@fig-rocr), which evaluates at each threshold the **confusion matrix** (@tbl-confusion-matrix). | ||
|
||
| | | | | | ||
|----------|--------------|---------------|----------------| | ||
| | | Predicted | | | ||
| | | 0 (absence) | 1 (presence) | | ||
| Observed | 0 (absence) | True absence | False presence | | ||
| | 1 (presence) | False absence | True presence | | ||
|
||
: Confusion matrix to understand predicted versus observed. {#tbl-confusion-matrix} | ||
|
||
![ROC curve generated by showing rates of false positive vs false negative as function of changing the threshold value (rainbow colors). Source: [ROCR: visualizing classifier performance in R](https://cran.rstudio.com/web/packages/ROCR/vignettes/ROCR.html)](figures/rocr.png){#fig-rocr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Fit | ||
|
||
Model fitting in theory is quite complex, but quite simple in practice, with feeding the prepared data into the modeling function. | ||
|
||
However there are MANY modeling techniques from which to choose. For instance check out 238 entries in [6 Available Models | The caret Package](https://topepo.github.io/caret/available-models.html). | ||
|
||
## Calibrate | ||
|
||
The process of refining the model to only the most relevant environmental predictor terms is commonly called "Model Selection." One of the most cited scientific paper of all time [@akaike1974] is based on taking a most parsimonious approach to this process -- the so called Akaike Information Criteria (AIC). | ||
|
||
It is important to avoid using environmental predictors that are correlated with each other, since the effect of a predictor on the response could be the ecologically inverse, the result of explaining variance on the residuals of the other correlated predictor. | ||
|
||
## Predict | ||
|
||
The prediction step applies the environmental relationships from the fitted model to a new set of data, typically the seascape of interest, and perhaps with some sort of temporal snapshot (e.g., climatic annual or monthly average). | ||
|
||
## Evaluate | ||
|
||
Model evaluation uses the set aside test data from the earlier splitting to evaluate how well the model predicts the response of presence or absence. Since the test response data is binary \[0,1\] and the prediction from the model is continuous \[0-1\], a threshold needs to be applied to assign to convert the continuous response to binary. This is often performed through a Receiver Operator Characteristic (**ROC**) curve (@fig-rocr), which evaluates at each threshold the **confusion matrix** (@tbl-confusion-matrix). | ||
|
||
| | | | | | ||
|----------|--------------|---------------|----------------| | ||
| | | Predicted | | | ||
| | | 0 (absence) | 1 (presence) | | ||
| Observed | 0 (absence) | True absence | False presence | | ||
| | 1 (presence) | False absence | True presence | | ||
|
||
: Confusion matrix to understand predicted versus observed. {#tbl-confusion-matrix} | ||
|
||
![ROC curve generated by showing rates of false positive vs false negative as function of changing the threshold value (rainbow colors). Source: [ROCR: visualizing classifier performance in R](https://cran.rstudio.com/web/packages/ROCR/vignettes/ROCR.html)](figures/rocr.png){#fig-rocr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
# Model | ||
--- | ||
title: "Model" | ||
subtitle: "Model the distribution of a species" | ||
--- | ||
|
||
```{mermaid} | ||
%%| label: fig-model | ||
%%| fig-cap: "Diagram of SDM Modeling processes." | ||
%%| file: diagrams/sdm-model.mmd | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: "Occurrences" | ||
subtitle: "Fetch presence observations and filter for quality control" | ||
--- | ||
|
||
To describe: | ||
|
||
- `robis` | ||
|
||
- Filter based on quality flags | ||
|
||
- Remove outliers | ||
|
||
- [`eks`](https://cran.r-project.org/web/packages/eks/vignettes/tidysf_kde.html)\ | ||
*Tidy and Geospatial Kernel Smoothing for spatially filtering outlier observations* | ||
|
||
![Source: Kernel density estimates for tidy and geospatial data in the eks package](figures/software/eks.png){#fig-eks} | ||
|
||
## Fetch OBIS | ||
|
||
## Filter occurrences |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Predict | ||
|
||
The prediction step applies the environmental relationships from the fitted model to a new set of data, typically the seascape of interest, and perhaps with some sort of temporal snapshot (e.g., climatic annual or monthly average). | ||
|
||
## Evaluate | ||
|
||
Model evaluation uses the set aside test data from the earlier splitting to evaluate how well the model predicts the response of presence or absence. Since the test response data is binary \[0,1\] and the prediction from the model is continuous \[0-1\], a threshold needs to be applied to assign to convert the continuous response to binary. This is often performed through a Receiver Operator Characteristic (**ROC**) curve (@fig-rocr), which evaluates at each threshold the **confusion matrix** (@tbl-confusion-matrix). | ||
|
||
| | | | | | ||
|----------|--------------|---------------|----------------| | ||
| | | Predicted | | | ||
| | | 0 (absence) | 1 (presence) | | ||
| Observed | 0 (absence) | True absence | False presence | | ||
| | 1 (presence) | False absence | True presence | | ||
|
||
: Confusion matrix to understand predicted versus observed. {#tbl-confusion-matrix} | ||
|
||
![ROC curve generated by showing rates of false positive vs false negative as function of changing the threshold value (rainbow colors). Source: [ROCR: visualizing classifier performance in R](https://cran.rstudio.com/web/packages/ROCR/vignettes/ROCR.html)](figures/rocr.png){#fig-rocr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.