R: Use SOM for quality analysis of time series samples

sits_som {sits} | R Documentation

## Use SOM for quality analysis of time series samples

### Description

These function use self-organized maps to perform quality analysis in satellite image time series

`sits_som_map()` creates a SOM map, where high-dimensional data is mapped into a two dimensional map, keeping the topological relations between data patterns. Each sample is assigned to a neuron, and neurons are placed in the grid based on similarity.

`sits_som_evaluate_cluster()` analyses the neurons of the SOM map, and builds clusters based on them. Each cluster is a neuron or a set of neuron categorized with same label. It produces a tibble with the percentage of mixture of classes in each cluster.

`sits_som_clean_samples()` evaluates the quality of the samples based on the results of the SOM map. 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".

### Usage

    sits_som_map(
      data,
      grid_xdim = 10,
      grid_ydim = 10,
      alpha = 1,
      rlen = 100,
      distance = "euclidean",
      som_radius = 2,
      mode = "online"
    )

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

    sits_som_evaluate_cluster(som_map)

### Arguments

`data` | A tibble with samples to be clustered.
`grid_xdim` | X dimension of the SOM grid (default = 25).
`grid_ydim` | Y dimension of the SOM grid.
`alpha` | Starting learning rate (decreases according to number of iterations).
`rlen` | Number of iterations to produce the SOM.
`distance` | The type of similarity measure (distance).
`som_radius` | Radius of SOM neighborhood
`mode` | Type of learning algorithm (default = "online")
`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` | Which types of evaluation to be maintained in the data

### Value

`sits_som_map()` prodices a list with three members: (1) the samples tibble, with one additional column indicating to which neuron each sample has been mapped; (2) the Kohonen map, used for plotting and cluster quality measures; (3) a tibble with the labelled neurons, where each class of each neuron is associated to two values: (a) the prior probability that this class belongs to a cluster based on the frequency of samples of this class allocated to the neuron; (b) the posterior probability that this class belongs to a cluster, using data for the neighbours on the SOM map.

`sits_som_clean_samples()` produces a sits tibble with an two additional columns.The first indicates if each sample is clean, should be analyzed or should be removed. The second indicates the posterior probability of the sample

`sits_som_evaluate_cluster()` produces a tibble with the clusters found by the SOM map. For each cluster, ir provides the percentage of classes inside it.

### Author(s)

Lorena Alves, lorena.santos@inpe.br

Karine Ferreira. karine.ferreira@inpe.br

### References

Lorena Santos, Karine Ferreira, Gilberto Camara, Michelle Picoli, Rolf Simoes, “Quality control and class noise reduction of satellite image time series”. ISPRS Journal of Photogrammetry and Remote Sensing, vol. 177, pp 75-88, 2021. https://doi.org/10.1016/j.isprsjprs.2021.04.014.

### Examples

    ## Not run:
    # Produce a cluster map
    som_map <- sits_som_map(samples_modis_4bands)
    # plot the som map
    plot(som_map)
    # calculate the mixture inside clusters
    eval <- sits_som_evaluate_cluster(som_map)
    # plot the cluster evaluation
    plot(eval)
    # Clean the samples to get better quality ones
    clean_samples <- sits_som_clean_samples(som_map)

    ## End(Not run)

[Package sits version 0.16.2 Index]