validate_fire_danger_levels: validate_fire_danger_levels

Description Usage Arguments Value Examples

View source: R/validate_fire_danger_levels.R

Description

This function compares observed and modelled fire data and return a contingency table summarising the hit rates, false alarms, misses and correct negatives. The validation can be done using various thresholds and input data.

Usage

1
2
3
4
5
6
validate_fire_danger_levels(
  fire_index,
  observation,
  fire_threshold,
  obs_threshold
)

Arguments

fire_index

RasterBrick containing the fire index (only one variable)

observation

RasterBrick containing the observation (only one variable)

fire_threshold

threshold to use to select relevant fire indices

obs_threshold

threshold to use to select relevant observations

Value

A list of two binary vectors: obs (observations) and pred (predictions).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
 # Read example data
 r_risico <- readRDS(system.file("extdata", "RISICO_raster.rds",
                                 package = "caliver"))
 # Set missing crs
 raster::crs(r_risico) <- "+proj=longlat +datum=WGS84 +no_defs"

  # Generate obs and pred binary vectors
  validate_fire_danger_levels(fire_index = r_risico,
                              observation = r_risico * 2,
                              fire_threshold = 0.5,
                              obs_threshold = 0.5)


## End(Not run)

caliver documentation built on Feb. 19, 2021, 5:07 p.m.