Learn R Programming

sits (version 0.13.0)

sits_som_clean_samples: Clean samples

Description

This function evaluate the quality of the samples based on the results of the SOM map. It produces a sits tibble with an evaluation column indicating if each sample is clean, should be analyzed or should be removed, and with a new column indicating the posterior probability of the sample

Usage

sits_som_clean_samples(
  som_map,
  prior_threshold = 0.6,
  posterior_threshold = 0.6,
  keep = c("clean", "analyze")
)

Arguments

som_map

An object returned by sits_som_map

prior_threshold

Threshold of conditional probability (frequency of samples assigned to the same SOM neuron)

posterior_threshold

Threshold of posterior probability (influenced by the SOM neighborhood)

keep

Samples evaluation to be maintained in the data

Value

List with two sits tibbles. The first tibble has clean samples The second has samples that need to be analysed.

Examples

Run this code
# NOT RUN {
# Read a set of samples
# Get a new subset of samples evaluated by clustering methods
som_map <- sits_som_map(samples_modis_4bands,
    grid_xdim = 10, grid_ydim = 10,
    distance = "euclidean"
)
new_samples <- sits_som_clean_samples(som_map)
# }

Run the code above in your browser using DataLab