R: Cluster cleaner

sits_cluster_clean {sits} | R Documentation

## Cluster cleaner

### Description

Removes labels that are minority in each cluster.

### Usage

    sits_cluster_clean(samples)

### Arguments

`samples` | Tibble with 'cluster' column.

### Value

A tibble with all selected samples.

### Author(s)

Rolf Simoes, rolf.simoes@inpe.br

### Examples

    ## Not run:
    # Load the "dtwclust" package
    # library(dtwclust)
    # calculate the dendrogram and the best clusters
    clusters <- sits_cluster_dendro(cerrado_2classes, bands = c("NDVI", "EVI"))
    # show clusters samples frequency
    sits_cluster_frequency(clusters)
    # remove cluster 3 from the samples
    clusters_new <- dplyr::filter(clusters, cluster != 3)
    # show clusters samples frequency
    sits_cluster_frequency(clusters_new)
    # clean all remaining clusters
    cleaned <- sits_cluster_clean(clusters_new)
    # show clusters samples frequency
    sits_cluster_frequency(cleaned)

    ## End(Not run)

[Package sits version 0.13.0 Index]