https://github.com/boyanangelov/sdmexplain

Explainable Species Distribution Modeling

https://github.com/boyanangelov/sdmexplain

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.0%) to scientific vocabulary

Keywords

ecology ecology-modelling explainable-ml machine-learning species-distribution-modelling
Last synced: 5 months ago · JSON representation

Repository

Explainable Species Distribution Modeling

Basic Info
  • Host: GitHub
  • Owner: boyanangelov
  • License: other
  • Language: R
  • Default Branch: master
  • Size: 1.25 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
ecology ecology-modelling explainable-ml machine-learning species-distribution-modelling
Created over 7 years ago · Last pushed about 6 years ago
Metadata Files
Readme Contributing License Code of conduct

README.Rmd

---
output:
  md_document:
    variant: markdown_github
    fig_width: 7
    fig_height: 7
---



```{r echo=FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
```


```{r eval=FALSE, message=FALSE, warning=FALSE, include=FALSE}
library(mlr)
library(sdmexplain)
library(dplyr)
```

[![DOI](https://zenodo.org/badge/142751918.svg)](https://zenodo.org/badge/latestdoi/142751918)

# sdmexplain

`sdmexplain` is an R package to make Species Distribution Models more explainable.

## Installation

```
devtools::install_github("boyanangelov/sdmexplain")
```

## Example

Preparing training data.

```{r eval=FALSE}
occ_data_raw <- sdmbench::get_benchmarking_data("Lynx lynx")
occ_data <- occ_data_raw$df_data
occ_data$label <- as.factor(occ_data$label)

coordinates.df <- rbind(occ_data_raw$raster_data$coords_presence,
                        occ_data_raw$raster_data$background)
occ_data <- cbind(occ_data, coordinates.df)

train_test_split <- rsample::initial_split(occ_data, prop = 0.7)
data.train <- rsample::training(train_test_split)
data.test  <- rsample::testing(train_test_split)

train.coords <- dplyr::select(data.train, c("x", "y"))
data.train$x <- NULL
data.train$y <- NULL

test.coords <- dplyr::select(data.test, c("x", "y"))
data.test$x <- NULL
data.test$y <- NULL
```

Training SDM.

```{r eval=FALSE}
task <- makeClassifTask(id = "model", data = data.train, target = "label")
lrn <- makeLearner("classif.lda", predict.type = "prob")
mod <- train(lrn, task)
```

Preparing data for explainability.

```{r eval=FALSE}
explainable_data <- prepare_explainable_data(data.test, mod, test.coords)
```

```{r eval=FALSE}
processed_plots <- process_lime_plots(explainable_data$explanation)
```

Plotting explainable map.

```{r example, eval=FALSE}
plot_explainable_sdm(explainable_data$processed_data,
                     explainable_data$processed_plots)
```


![](screenshots/screenshot_1.png)

Cite as: Boyan Angelov. (2018, October 4). boyanangelov/sdmexplain: sdmexplain: An R Package for Making Species Distribution Models More Explainable (Version v0.1.0). Zenodo. http://doi.org/10.5281/zenodo.1445779

Owner

  • Name: Boyan Angelov
  • Login: boyanangelov
  • Kind: user
  • Location: Berlin, Germany

Data Strategist | Author | Researcher (Complexity, AI)

GitHub Events

Total
Last Year

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 18
  • Total Committers: 1
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Boyan Angelov b****v@g****m 18

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels