R: Clean samples

sits_som_clean_samples {sits} | R Documentation

## 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.

### Note

The algorithm identifies noisy samples, using 'prior_threshold' for the prior probability and 'posterior_threshold' for the posterior probability. Each sample receives an evaluation tag, according to the following rule: (a) If the prior probability is < 'prior_threshold', the sample is tagged as "remove"; (b) If the prior probability is >= 'prior_threshold' and the posterior probability is >='posterior_threshold', the sample is tagged as "clean"; (c) If the prior probability is >= 'posterior_threshold' and the posterior probability is < 'posterior_threshold', the sample is tagged as "analyze" for further inspection.

The user can define which tagged samples will be returned using the "keep" parameter, with the following options: "clean", "analyze", "remove".

### Author(s)

Lorena Santos, lorena.santos@inpe.br

Karine Ferreira. karine.ferreira@inpe.br

### Examples

    ## 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)

    ## End(Not run)

[Package sits version 0.14.0 Index]