Skip to contents

Perform clustering on the rows (usually cases) of a dataset.

Usage

cluster(x, algorithm = "KMeans", config = NULL, verbosity = 1L)

Arguments

x

Matrix or data.frame: Data to cluster. Rows are cases to be clustered.

algorithm

Character: Clustering algorithm.

config

List: Algorithm-specific config.

verbosity

Integer: Verbosity level.

Value

Clustering object.

Details

See rdocs.rtemis.org/cluster for detailed documentation.

Author

EDG

Examples

iris_km <- cluster(exc(iris, "Species"), algorithm = "KMeans")
#> 2026-02-22 18:59:15 
#>
#>  [cluster]
#> 2026-02-22 18:59:15 
#> Input: 150 cases x 4 features.
#>  [summarize_unsupervised]
#> 2026-02-22 18:59:15 
#> Clustering with KMeans...
#>  [cluster]
#> 2026-02-22 18:59:15 
#> Checking unsupervised data...
#>  
#>  
#> [check_unsupervised_data]
#> 
#> 2026-02-22 18:59:15 
#> Clustering with KMeans ...
#>  [cluster_]
#> 2026-02-22 18:59:15 
#>  Done in 0.20 seconds.
#>  [cluster]