tie_finder: Number of tied soil classes

View source: R/dsmartr_evaluate.R

tie_finderR Documentation

Number of tied soil classes

Description

Checks existence of ties for most-probable soil and reports how many classes are tied on a given pixel.

Usage

tie_finder(input = NULL)

Arguments

input

A vector of integers n soil classes long, where the integers refer to the number of times a soil class was predicted.

n_iterations

Integer; the total number of model runs.

noise_cutoff

Decimal; proportion of predictions to be considered 'noise' and ignored. Allowable values range between 0 and 1.

Value

Integer; the number of distinct soil classes predicted on the pixel (optionally, above a supplied threshold).

Note

This is a helper function and not widely applicable. It is expected to be used in concert with rasteR::calc(), applied to a stack of tallied soil class predictions produced by dsmartr::eval_npred().

Examples

## Not run: 
# a set of tallies from the heronvale demo data
counts_19291 <- as.integer(c(0, 1, 3, 0,  0, 0, 17,  0, 8, 0, 0, 6, 0, 0, 12,
1, 0, 0, 0, 0, 12, 0, 0, 8, 0,  0, 0,  0, 12, 1, 3, 5, 2, 9, 0,  0, 0, 0))
ties <- tie_finder(counts_19291) # ties exist, but not for most-probable

## End(Not run)


obrl-soil/dsmartr documentation built on Feb. 1, 2024, 10:57 p.m.