View source: R/dsmartr_evaluate.R
n_predicted | R Documentation |
Counts how many different soil classes were predicted on a pixel
n_predicted(input = NULL, n_iterations = NULL, noise_cutoff = NULL)
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. |
Integer; the number of distinct soil classes predicted on the pixel (optionally, above a supplied threshold).
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()
.
## 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))
n_soils <- n_soils_predicted(counts_19291)
n_soils_10 <- n_soils_predicted(counts_19291, 100, 0.1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.