sits_som_clean_samples: Cleans the samples based on SOM map information

View source: R/sits_som.R

sits_som_clean_samplesR Documentation

Cleans the samples based on SOM map information

Description

Cleans the samples based on SOM map information

Usage

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

Arguments

som_map

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

Which types of evaluation to be maintained in the data.

Value

tibble with an two additional columns. The first indicates if each sample is clean, should be analyzed or should be removed. The second is the posterior probability of the sample.

Examples

if (sits_run_examples()) {
    # create a som map
    som_map <- sits_som_map(samples_modis_ndvi)
    # plot the som map
    plot(som_map)
    # evaluate the som map and create clusters
    clusters_som <- sits_som_evaluate_cluster(som_map)
    # plot the cluster evaluation
    plot(clusters_som)
    # clean the samples
    new_samples <- sits_som_clean_samples(som_map)
}


sits documentation built on Nov. 2, 2023, 5:59 p.m.